Compression algorithm

The pseudocode for the Compression algorithm uses the state variables described in State Variables (section DecompressedCurrent, DecompressedBufferEnd, and CompressedCurrent. These state variables MUST be initialized by the caller. CompressedChunkStart and DecompressedChunkStart are also used.

 SET SignatureByte TO 0x01 
 INCREMENT CompressedCurrent
 WHILE DecompressedCurrent is LESS THAN DecompressedBufferEnd
    SET CompressedChunkStart TO CompressedCurrent
    SET DecompressedChunkStart TO DecompressedCurrent
    CALL Compressing a DecompressedChunk (section