Patent attributes
A data compressor is provided which performs substitution-based data encoding. The compressor identifies repetitive data of an input file and writes meta-data representative of the repetitive data to a first buffer using a triple structure. The triple structure includes information of a length of non-repetitive data preceding repetitive data, an offset between like groups of repetitive data, and a length of the repetitive data. Non-repetitive data is written to a second buffer. The compressor concatenates the first and second buffers along with information of the length of the input file and the length of the first buffer to form a compressed file. A corresponding decompressor parses the compressed file and quickly computes the original file using a pre-allocated memory area.