GalSim-developers/GalSim — pull request #336 by rmjarvis (2013-01-09 07:56:04+00:00)
Title: #299 Support reading and writing compressed files

I've added the ability for GalSim to read and write compressed fits files. The possible compression schemes are:

gzip on the full file
bzip2 on the full file
rice on the image data in tiles (a la fpack)
hcompress in tiles
plio in tiles
gzip in tiles

For the first three, it will automatically do the compression (or decompression) if the filename ends in '.gz', '.bz2', or '.fz' respectively.

The others need to be specified by hand, since no one came up with a "normal" extension for these. This is done via a new `compression` kwarg for the various read/write functions. The value is just the name of the compression algorithm except the last one is called 'gzip_tile'. Of course, the first three may also be specified by hand if you want to override the automatic determination from the filename extension (or None for no compression).