GZIPFormats
GZIPFormats refers to the family of file formats that encapsulate DEFLATE-compressed data within the GZIP wrapper. The canonical specification is defined in RFC 1952, and implementations are designed to be interoperable across platforms. A GZIP file contains a header, a DEFLATE-compressed data stream, and a trailer. The header identifies the format, specifies the compression method, and stores metadata such as modification time, optional flags, and the originating OS. In detail, the header begins with ID1 and ID2 bytes (0x1F and 0x8B), uses CM set to 8 for DEFLATE, and includes FLG for optional fields, followed by MTIME, XFL, and OS. The data portion is a DEFLATE stream, which combines LZ77 compression with Huffman coding. The trailer stores a CRC32 checksum of the uncompressed data and the size of the original uncompressed data modulo 2^32.
GZIP supports concatenation of multiple members, allowing a single file to contain several compressed streams in
Common extensions include the .gz extension and, less commonly, .gzip. In practice, gzip-compatible tools (such as