There are many situations in which you need to compress or decompress images. For example, to save space in an archive, or to save network transfer time. The Compress class provides methods to compress and decompress images using one of the following compression types:
The following example compresses and then decompresses the file "test.fits" using the H-compress compression type:
if (c.compress("test.fits", "test.hfits", Compress::H_COMPRESS) != 0) return ERROR; if (c.decompress("test.hfits", "test.fits", Compress::H_COMPRESS) != 0) return ERROR
See the man page Compress(3) for more details.
Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory