[fitsbits] BZIP2 FITS image compression feasibility study

William Pence William.Pence at nasa.gov
Wed Jun 3 16:20:06 EDT 2009


The FITS tiled-image compression convention (see 
http://fits.gsfc.nasa.gov/registry/tilecompression.html) currently 
supports 3 general-purpose image compression algorithms: Rice, 
Hcompress, and GZIP.   Recently, I did some comparison tests using the 
BZIP2 compression algorithm to see if it offers any unique advantages 
that would justify adding it as one of the supported algorithms.

A link to the complete feasibility report is available from the fpack 
web page at http://heasarc.gsfc.nasa.gov/fitsio/fpack/ and the main 
results are as follows:

- The Rice algorithm generally provides better compression than BZIP2 
when the image is compressed using the default row-by-row tiling 
pattern.  BZIP2 only produces (slightly) better compression than Rice or 
Hcompress when using much larger sized tiles (e.g., compressing the 
whole image as a single tile), but this can seriously degrade the I/O 
performance for software applications that read the compressed image on 
a row by row basis.

- Compressing an image using BZIP2 typically takes 15 to 30 times more 
CPU time than the Rice algorithm, depending on how much noise is in the 
image.

- Similarly, BZIP2 takes 4 to 6 times more CPU time than Rice to 
uncompress the image.

Thus, based on these tests, there appears to be little justification for 
adding support for BZIP2 within the FITS tiled-image compression 
convention.

-Bill Pence
-- 
____________________________________________________________________
Dr. William Pence                       William.Pence at nasa.gov
NASA/GSFC Code 662       HEASARC        +1-301-286-4599 (voice)
Greenbelt MD 20771                      +1-301-286-1684 (fax)





More information about the fitsbits mailing list