Patent ID: 7397959

Claim:
A method for detecting, compressing, and decompressing previously compressed data that resides in data or files of an unknown or partially known data stream or file format, said method comprising the steps of: (a) determining a type of data to be compressed; (b) when outer file formats are known, processing the known file types with standard methods known for that file type; (c) when outer file formats are not known, searching a database to determine what data types could be embedded in the outer format; (d) scanning a document byte-by-byte and either comparing next N bytes against a header format for possible inner formats for partially known files, or comparing the next N bytes against all data types for unknown file types for available recompression algorithms; (e) when matches are found, recompressing the now known sequence of data using a specialized recompressor; (f) acquiring information about the compressed data, including at least the original compression method, original compressed size, and structure of the outer format, and encoding such information into the recompressed file; (g) decoding the compressed data stream; and (h) adjusting and updating reference to compressed sizes and offsets.