From Just Solve the File Format Problem
PNM, BMP, and Radiance HDR image files. Like its counterpart packJPG, it can be thought of as a graphics format, or as a special-purpose compression format.packPNM is a utility and format for losslessly compressing many
Apparently, the header of the file is left unchanged, except that the first byte is changed to 0x53 (ASCII "S"). So, a packPNM-compressed binary PPM file begins with "S6" instead of "P6". A compressed BMP file begins with "SM" instead of "BM".