Open infy-infy opened 4 years ago
Is this package still maintained?
Noticed a similar problem when trying to use unlzw
for uncompressing binary data, and I think the problem described here https://github.com/astropy/astropy/issues/10714#issuecomment-769319604 comes down to calling
return _ffi.string(out[0], outlen[0])
in __init__.py
, which truncates the data buffer at the first null character – changing this to
return _ffi.buffer(out[0], outlen[0])[:]
worked for my examples.
EDIT: The above may not be relevant for this issue, which is a case of unlzw
returning retcode=-3
– looking at the file it seems that it might be missing an EOL/EOF; the last line of that file (uncompressed) looks incomplete. I guess that does not necessarily mean its contents cannot be unpacked, so perhaps the return value -3
could be handled differently, raising just a warning or adding an option to override the ValueError
.
It gives an error: "Stream ended in the middle of a code." Code that reproduces bug:
gunzip extract file without problems. Github doesn't allow to attach .Z files directly, so I put it in zip archive, you'll need to unpack it first. igsg2260.15i.Z.zip