Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:54:23+00:00 2026-06-10T09:54:23+00:00

My company uses a legacy file format for Electromiography data, which is no longer

  • 0

My company uses a legacy file format for Electromiography data, which is no longer in production. However, there is some interest in maintaining retro-compatibility, so I am studying the possibility to write a reader for that file format.

By analyzing a very convoluted former source code written in Delphi, the file reader/writer uses ZLIB, and inside a HexEditor it looks like there is a file header in binary ASCII (with fields like “Player”, “Analyzer” readily readable), followed by a compressed string containing raw data.

My doubt is: how should I proceed in order to identify:

  • If it is a compressed stream;
  • Where does the compressed stream start and where does it end;

From Wikipedia:

zlib compressed data is typically written with a gzip or a zlib
wrapper. The wrapper encapsulates the raw DEFLATE data by adding a
header and trailer. This provides stream identification and error
detection

Is this relevant?

I’ll be glad to post more information, but I don’t know what would be most relevant.

Thanks for any hint.

EDIT: I have the working application, and can use it to record actual data of any time length, getting files even smaller than 1kB if necessary.


Some sample files:

A freshly created one, without datastream: https://dl.dropbox.com/u/4849855/Mio_File/HeltonEmpty.mio

The same as above after a very short (1 second?) datastream has been saved: https://dl.dropbox.com/u/4849855/Mio_File/HeltonFilled.mio

A different one, from a patient named “manco” instead of “Helton”, with an even shorter stream (ideal for Hex viewing): https://dl.dropbox.com/u/4849855/Mio_File/manco_short.mio

Instructions: each file should be the file of a patient (a person). Inside these files, one or more exams are saved, each exam consisting of one or more time series. The provided files contain only one exam, with one data series.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:54:25+00:00Added an answer on June 10, 2026 at 9:54 am

    To start, why not scan the files for all valid zip streams (it’s good enough for small files and to figure out the format):

    import zlib
    from glob import glob
    
    def zipstreams(filename):
        """Return all zip streams and their positions in file."""
        with open(filename, 'rb') as fh:
            data = fh.read()
        i = 0
        while i < len(data):
            try:
                zo = zlib.decompressobj()
                yield i, zo.decompress(data[i:])
                i += len(data[i:]) - len(zo.unused_data)
            except zlib.error:
                i += 1
    
    for filename in glob('*.mio'):
        print(filename)
        for i, data in zipstreams(filename):
            print (i, len(data))
    

    Looks like the data streams contain little-endian double precision floating point data:

    import numpy
    from matplotlib import pyplot
    
    for filename in glob('*.mio'):
        for i, data in zipstreams(filename):
            if data:
                a = numpy.fromstring(data, '<f8')
                pyplot.plot(a[1:])
                pyplot.title(filename + ' - %i' % i)
                pyplot.show()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our company uses an old app which reads TSQL from a .INI file. Due
My company uses a lot of legacy cookies that contain '=' and ',' in
My company uses Accurev for source control, and for all its benefits, there's one
The software my company uses has a web service which signature is more or
I met a problem which is very strange, my company uses Visual Source Safe
My company uses a combination of some database tables, a web page front end
There is a website that my company uses that updates information about 3 specific
My company uses an internally developed package to support internationalization/localization. However, it was developed
My company uses layout.phtml which is being shared by all the pages in the
My company uses ASHX files to serve some dynamic images. Being it that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.