https://heasarc.gsfc.nasa.gov/docs/soft ... ssion.html
https://heasarc.gsfc.nasa.gov/docs/soft ... ode41.html
There's also hcompress (haar compression w/ http://www.stsci.edu/software/hcompress.html , which is what is used in the DSS - (I hope to do something better someday...) for people who might tolerate compression losses below certain thresholds with well understood error characteristics (this is why it was allowed to be used in DSS..)
You're going to want to use GZIP_2 tiled for lossless. Tiled for localized compression, tiles like 128x128 or 256x256 to take advantage of localized properties in 2d vs a giant more "random" looking 1d problem. Why GZIP_2? From the above links:
Shuffling bits across pixels/signals can let's LZ family algorithms be much more effective. This will be more effective and much faster than the recent addition of the bzip2 encoding and should work just as easy for most software using the library to read fits files correctly. Utilities/python can uncompress otherwise.There are 2 variants of the GZIP algorithm: GZIP_1 compresses the array of image pixel value normally with the GZIP algorithm, while GZIP_2 first shuffles the bytes in all the pixel values so that the most-significant byte of every pixel appears first, followed by the less significant bytes in sequence. GZIP_2 may be more effective in cases where the most significant byte in most of the image pixel values contains the same bit pattern. In principle, any number of other compression algorithms could also be supported by the FITS tiled image compression convention.
I've done this comparison before in other domains, you will not easily beat the compression there without going wavelets/lossy / or changing the lz algorithm (which then would go outside of cfitsio), and it's great that it's still very fast - in some cases due to disk read times can be faster than not iff not in memory.
Comparison from 3rd party in 2009, I might be missing something but there was nothing positive sounding about bzip2: https://heasarc.gsfc.nasa.gov/fitsio/fp ... report.pdf
I will provide a few benchmark images and sizes shortly
This thread was spawned by http://www.prism-astro.com/forum_us/vie ... &t=454#top, which was locked - couldn't think of a better way to provide the suggestion than a new thread..somewhere.