Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open compressed files #133

Open
hombit opened this issue Feb 21, 2019 · 2 comments
Open

Open compressed files #133

hombit opened this issue Feb 21, 2019 · 2 comments
Assignees

Comments

@hombit
Copy link
Collaborator

hombit commented Feb 21, 2019

Fips should open compressed files such as .fits.gz, .fits.zip, etc.

Qt has very limited support of uncompression that is used for its internal media data:

Note: If you want to use this function to uncompress external data that was compressed using zlib, you first need to prepend a four byte header to the byte array containing the data. The header must contain the expected length (in bytes) of the uncompressed data, expressed as an unsigned, big-endian, 32-bit integer.
https://doc.qt.io/qt-5/qbytearray.html#qUncompress

Qt uses the zlib library to provide compression. This means that you can compress and decompress your bytearrays of data using Qt. See the documentation on qUncompress() http://doc.qt.io/qt-5/qbytearray.html#qUncompress
Note that this does not produce file archives that can be opened by other applications, to do that you will need to write it yourself using Qt's custom file handling system http://doc.qt.io/qt-4.8/qabstractfileengine.html#details or use a 3rd party library.
https://wiki.qt.io/Technical_FAQ

@hombit hombit self-assigned this Feb 21, 2019
@matwey
Copy link
Owner

matwey commented Feb 21, 2019

@hombit
Copy link
Collaborator Author

hombit commented Feb 21, 2019

https://heasarc.gsfc.nasa.gov/docs/software/fitsio/compression.html

I've opened separated issue #134 for compressed FITS data case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants