***** File COMPRESS.TXT                                                       
                                                                              
     Microdensitometry performed at the NASA/Goddard Space Flight Center of   
more than 1000 wide-field plates of Halley's Comet has resulted in the        
creation of 20 gigabytes of Large-Scale Phenomena (L-SP) data for the IHW to  
deposit on CD-ROM.  In its original uncompressed form -- every pixel being    
represented by a 2-byte number -- this would have required between 35 and 40  
disks for the L-SP data alone!  Primarily to reduce project costs, but also to
create a CD-ROM archive of a size more manageable to the end user, the IHW    
decided several years ago that data compression techniques would be used to   
reduce the number of disks by a substantial factor (two or more).             
                                                                              
     Following an experimentation period during which several techniques were 
examined, a previous pixel algorithm was chosen to accomplish the compression.
While not offering the maximum compression factor among all possible          
techniques (including nesting of techniques), previous pixel compression does 
offer the advantages of being extremely simple in concept and of permitting   
fast, "on the fly" decompression, while at the same time yielding typical     
compression factors close to two.                                             
                                                                              
     The algorithm works as follows.  The compressed image byte stream starts 
with the byte value 255 (FF hex) followed by the full 2-byte value of the     
first pixel, with the bytes in standard FITS byte ordering. Thereafter, if the
difference between the "i"th pixel and the "i-1"th pixel is less than 127     
(absolute), that difference has the value 127 added to it (to avoid negative  
byte values) and is placed in the compressed byte stream as a single byte     
value.  If, on the other hand, the difference is greater than 127 (absolute), 
the value 255 is placed in the byte stream followed by the original 2-byte    
value for the "i"th pixel.  We then proceed to the next pixel as before. Thus,
every 2-byte value in the compressed byte stream is prefixed with the flag    
value 255. Every value without such a prefix is presumed to be a 1-byte       
difference. The compression was accomplished using the program called PACKER, 
which was run on an IBM 3081 at the NASA/Goddard Space Flight Center. The     
source for the program is in the file PACKER.FOR, located in the SOFTWARE     
directory of this disc.  A decompression algorithm is provided in the DECOMP  
subdirectory of the SOFTWARE directory, and descriptions of these routines are
given in the DECOMP.TXT and PCDECOMP.TXT files of the DOCUMENT directory.     
                                                                              
    The FITS header for each compressed image has been modified using the FITS
extensions.  The details of the modifications to the header are found in the  
file COMPINFO.TXT in the DOCUMENT directory. The extensions on the filenames  
for the compressed data (.IMQ = image, .HDR = header, and .LBL = label) follow
the IHW filename conventions.  To reconstruct the original FITS byte stream,  
the .HDR and the .IMQ files for the appropriate observation must be           
concatenated.                                                                 
                                                                              
