octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loa


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #48018] This .mat file version 5 cannot be loaded in Octave (while it can in Matlab)
Date: Wed, 25 May 2016 23:23:09 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #7, bug #48018 (project octave):

I was curious so I worked on this for a half hour. Here's what I've found as
to the cause of this error.

Both files contain zlib-compressed data. The mat v5 file specification has a
size field outside of the compression, and then a size of the data element
inside of the compression.

The file produced by Matlab is entirely consistent. The file size is 1176
bytes, 136 bytes of standard file header, and 1040 bytes of zlib-compressed
data. Uncompressing 1040 bytes results in exactly 6896 bytes, which is also
exactly what the value of the size field is in the first few bytes of the
compressed block.

The file produced by EFMtool uncompresses into more data than it claims should
be there. The file is 1362 bytes, again 136 bytes of header and 1226 bytes of
zlib-compressed data. Uncompressing the trailing 1226 bytes yields 14,152
bytes. However, the data size field in the first few bytes of the compressed
block say the data should be 13,448 bytes.

This doesn't seem like an error on the surface, but I'm guessing that Octave
attempts to call uncompress of 14,152 bytes into a buffer of length 13,448,
and gets the Z_BUF_ERROR return value because the output buffer wasn't large
enough to finish decompressing.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48018>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]