Reversible method of encoding data
First Claim
1. A method of data compression to encode a plurality of sequential data bytes to provide an encoded data stream, the encoded data stream including noncompressed data strings interleaved with compressed data strings, each compressed data string having a plurality of consecutive compressed data units, each compressed data unit indicating a length and an offset, each compressed data unit corresponding to at least a first predetermined number of sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes, the method comprising the steps of:
- comparing the plurality of sequential data bytes that are not encoded to the encoded data stream to determine the longest match therewith;
appending to the encoded data stream a compressed data unit corresponding to the match for each match of at least the first predetermined number of sequential data bytes that are not encoded, the compressed data unit indicating the length of the match and the offset between the data unit and the matching encoded data;
appending to the encoded data stream a noncompressed data byte for each sequential data byte not contained in any match of at least the first predetermined number of sequential data bytes that are not encoded;
inserting into each noncompressed data string a code indicating the number of consecutive bytes in the noncompressed data string; and
inserting into each compressed data string a code indicating the number of compressed data units in the compressed data string.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of reversible data compression is disclosed. The method is an improvement on the Lempel-Ziv data compression method that does not require a prefix for every noncompressed data unit in the encoded data stream. A code is inserted at the beginning of each string of consecutive noncompressed data bytes to indicate that the string is of noncompressed data and the number of bytes in the string. By eliminating the requirement for a separate prefix for each noncompressed data, a higher compression ratio is achieved over conventional Lempel-Ziv encoding methods.
-
Citations
29 Claims
-
1. A method of data compression to encode a plurality of sequential data bytes to provide an encoded data stream, the encoded data stream including noncompressed data strings interleaved with compressed data strings, each compressed data string having a plurality of consecutive compressed data units, each compressed data unit indicating a length and an offset, each compressed data unit corresponding to at least a first predetermined number of sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes, the method comprising the steps of:
-
comparing the plurality of sequential data bytes that are not encoded to the encoded data stream to determine the longest match therewith; appending to the encoded data stream a compressed data unit corresponding to the match for each match of at least the first predetermined number of sequential data bytes that are not encoded, the compressed data unit indicating the length of the match and the offset between the data unit and the matching encoded data; appending to the encoded data stream a noncompressed data byte for each sequential data byte not contained in any match of at least the first predetermined number of sequential data bytes that are not encoded; inserting into each noncompressed data string a code indicating the number of consecutive bytes in the noncompressed data string; and inserting into each compressed data string a code indicating the number of compressed data units in the compressed data string. - View Dependent Claims (2, 3, 4)
-
-
5. A method of data compression to encode a plurality of sequential data bytes to provide an encoded data stream, the encoded data stream including noncompressed data strings interleaved with compressed data strings, each compressed data string having a plurality of consecutive compressed data units, each compressed data unit indicating a length and an offset, each compressed data unit corresponding to at least a first predetermined number of consecutive sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes beginning at the start of the plurality of sequential data bytes, the method comprising the steps of:
-
comparing the plurality of sequential data bytes that are not encoded to the encoded data stream to determine the longest match therewith; appending to the encoded data a compressed data unit corresponding to the match for each match of at least a first predetermined number of sequential data bytes that are not encoded, the compressed data unit indicating the length of the match, and the offset of the data unit to the matching encoded data; appending to the encoded data stream a noncompressed data byte for each sequential data byte not contained in any match of at least the first predetermined number of sequential data bytes that are not encoded; and inserting into each noncompressed data string a code indicating the number of consecutive bytes in the noncompressed data string, wherein each compressed data unit further indicating whether a noncompressed data byte immediately follows. - View Dependent Claims (6, 7)
-
-
8. A method of decoding an encoded data stream to provide a plurality of sequential data the encoded data stream including noncompressed data strings interleaved with compressed data strings, each compressed data string having a plurality of consecutive compressed data units and a code indicating the number of compressed data units in the compressed data string, each compressed data unit indicating a length and an offset, the length indicating the number of bytes of matching uncompressed data, the offset indicating the separation of the compressed data unit from the matching uncompressed data bytes, each compressed data unit corresponding to at least a first predetermined number of consecutive sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes and a code indicating the number of consecutive bytes in the noncompressed data stream, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes beginning at the start of the plurality of sequential data bytes, the method comprising the steps of:
-
receiving the encoded data stream from a source; detecting the code of each noncompressed data string to determine a count of the corresponding data bytes to be appended to the plurality of sequential data bytes; appending the corresponding noncompressed data bytes to the plurality of sequential data bytes according to the detected count for each noncompressed data string; detecting the code of each compressed data string to determine a count of the compressed data units in the compressed data string; determining the offset and length of each compressed data unit in each compressed data string; forming a string of contiguous data bytes matching the contiguous portion of the sequential data bytes starting at a location determined by the offset relative to the compressed data unit and having a length determined by the length of the compressed data unit for each compressed data unit; and appending each string of contiguous data bytes formed from the compressed data units to the plurality of sequential data bytes. - View Dependent Claims (9, 10, 11)
-
-
12. A method of decoding an encoded data stream to provide a plurality of sequential data, the encoded data stream including noncompressed data strings interleaved with compressed data units, each compressed data unit indicating whether a noncompressed data byte immediately follows, each compressed data unit indicating a length and an offset, the length indicating the number of bytes of matching uncompressed data, the offset indicating the separation of the compressed data unit from the matching uncompressed data bytes, each compressed data unit corresponding to at least a first predetermined number of sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes and a code indicating the number of consecutive bytes in the noncompressed data stream, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes beginning at the start of the plurality of sequential data bytes, the method comprising the steps of:
-
receiving the encoded data stream from a source; detecting the code of each noncompressed data string to determine a count of the corresponding data bytes to be appended to the plurality of sequential data bytes; appending the corresponding noncompressed data bytes according to the detected count for each noncompressed data string; detecting each compressed data unit to determine the location of the matching noncompressed data bytes from the offset of the compressed data unit, the number of matching noncompressed data bytes represented by the data unit from the length, and determine whether a noncompressed data byte immediately follows the compressed data unit; forming for each detected compressed data unit a string of contiguous data bytes corresponding to the contiguous portion of the sequential data bytes starting at a location determined by the offset of the compressed data unit relative to the compressed data unit and having a length determined by the length of the compressed data unit; and appending the string of contiguous data bytes formed from the detections of compressed data units to the plurality of sequential data bytes. - View Dependent Claims (13, 14)
-
-
15. An apparatus for encoding a plurality of sequential data bytes, to provide an encoded data stream, the encoded data stream including noncompressed data strings interleaved with compressed data strings, each compressed data string having a plurality of consecutive compressed data units, each compressed data unit indicating a length and an offset, each compressed data unit corresponding to at least a first predetermined number of consecutive sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes corresponding to the start of the plurality of sequential data bytes, the apparatus comprising:
-
an encoding type detection section for comparing the plurality of sequential data bytes that are not encoded to the encoded data stream to determine the longest match therewith; a compressed data encoder for appending to the encoded data stream compressed data units corresponding to matches of at least the first predetermined number of consecutive sequential data bytes that are not encoded, the compressed data unit indicating the length of the match and the offset between the data unit and the matching encoded data, and inserting into each compressed data string a code indicating the number of compressed data units in the compressed data string; and a noncompressed data encoder for appending to the encoded data stream a noncompressed data byte each sequential data byte not contained in any match of at least a first predetermined number of consecutive sequential data bytes that are not encoded, and inserting into each noncompressed data string a code indicating the number of consecutive bytes in the noncompressed data string. - View Dependent Claims (16, 17, 18)
-
-
19. An apparatus for encoding a plurality of sequential data bytes, to provide an encoded data stream, the encoded data stream including noncompressed data strings interleaved with compressed data strings, each compressed data string having a plurality of consecutive compressed data units, each compressed data unit indicating a length and an offset, each compressed data unit corresponding to at least a first predetermined number of consecutive sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes beginning at the start of the plurality of sequential data bytes, the apparatus comprising:
-
an encoding type detection section for comparing the plurality of sequential data bytes that are not encoded to the encoded data stream to determine the longest match therewith; a compressed data encoder for appending to the encoded data a compressed data unit corresponding to the longest of matches of at least the first predetermined number of consecutive sequential data bytes with consecutive encoded data units, the compressed data unit indicating the length of the match, and the offset of the data unit to the matching encoded data; and a noncompressed data encoder for appending to the encoded data stream a noncompressed data byte for each sequential data byte not contained in any match of at least the first predetermined number of consecutive sequential data units that are encoded, and inserting each noncompressed data string a code indicating the number of consecutive bytes in the noncompressed data string, wherein each compressed data unit further indicating whether a noncompressed data byte immediately follows. - View Dependent Claims (20, 21)
-
-
22. An apparatus for decoding an encoded data stream to provide a plurality of sequential data bytes, the encoded data stream including noncompressed data strings interleaved with compressed data strings, each compressed data string having a plurality of consecutive compressed data units and a code indicating the number of compressed data units in the compressed data string, each compressed data unit indicating a length and an offset, the length indicating the number of bytes of matching uncompressed data, the offset indicating the separation of the compressed data unit from the matching uncompressed data bytes, each compressed data unit corresponding to at least a first predetermined number of consecutive sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes and a code indicating the number of consecutive bytes in the noncompressed data stream, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes beginning at the start of the plurality of sequential data bytes, the apparatus comprising:
-
a buffer for receiving the encoded data stream from a source; a noncompressed data detection section for detecting the code of each noncompressed data string to determine a count of corresponding data bytes to be appended to the plurality of sequential data bytes; a noncompressed data decoder for appending the corresponding noncompressed data bytes according to the detected count for each noncompressed data string; a compressed data detection section for detecting the code of each compressed data string to determine a count of the compressed data units in the compressed data string; and a compressed data unit decoder section for determining the offset and length of each compressed data unit in each compressed data string, forming a string of contiguous data bytes corresponding to the contiguous portion of the sequential data bytes starting at a location determined by the offset relative to the compressed data unit and having a length determined by the length of the compressed data unit for each compressed data unit, and appending the string of contiguous data bytes formed from the compressed data units to the plurality of sequential data bytes. - View Dependent Claims (23, 24, 25)
-
-
26. An apparatus for decoding an encoded data stream to provide a plurality of sequential data bytes, the encoded data stream including noncompressed data strings interleaved with compressed data units, each compressed data unit indicating whether a noncompressed data byte immediately follows, each compressed data unit indicating a length and an offset, the length indicating the number of bytes of matching uncompressed data, the offset indicating the separation of the compressed data unit from the matching uncompressed data bytes, each compressed data unit corresponding to at least a first predetermined number of consecutive sequential data bytes, each noncompressed data string having a plurality of consecutive noncompressed data bytes and a code indicating the number of consecutive bytes in the noncompressed data stream, each noncompressed data byte corresponding to one of the sequential data bytes, the encoded data stream having an initial noncompressed data string having at least a second predetermined number of consecutive bytes beginning at the start of the plurality of sequential data bytes, the apparatus comprising:
-
a buffer for receiving the encoded data stream from a source; a noncompressed data detection section for detecting the code of each noncompressed data string to determine a count of the corresponding data bytes to be appended to the plurality of sequential data bytes; a noncompressed data decoder for appending the corresponding noncompressed data bytes according to the detected count for each noncompressed data string; a compressed data detection section for detecting each compressed data unit to determine the location of the matching noncompressed data bytes from the offset of the compressed data unit, the number of matching noncompressed data bytes represented by the data unit from the length, and determine whether a noncompressed data byte immediately follows the compressed data unit; and a compressed data decoder for forming a string of contiguous data bytes corresponding to the contiguous portion of the sequential data bytes starting at a location determined by the offset relative to the compressed data unit and having a length determined by the length of the compressed data unit, and appending the string of contiguous data bytes formed from the detections of compressed data units to the plurality of sequential data bytes. - View Dependent Claims (27, 28, 29)
-
Specification