This code compresses and decompresses a data stream using a combination of compression techniques that are optimized for compressing disk image data.
Compression methods used by this program include:
- Run-length encoding (RLE), packing long repetitions of a single byte value into a short value:length pair
- Lempel-Ziv (dictionary-based) compression with optimized searching
- Sequential increment compression, where 8-, 16-, and 32-bit values that are incremented by 1 are converted to a pair consisting of an inital value and a count
- Byte plane transformation, putting bytes at specific intervals together to allow compression of some forms of otherwise incompressible data. This is performed on otherwise incompressible data to see if it can be arranged differently to produce a compressible pattern.