A method for run-length encoding two or more data values, the method comprising: loading the data values into storage by forming a first data string, the data string comprising a plurality of data sub-strings and each data sub-string representing at least one of the data values; generating a second data string having a data sub-string corresponding to each data sub-string of the first data string, all the bits of each of the data sub-strings of the second data string having a first predetermined value if all the bits of the corresponding data sub-string of the first data string have a second predetermined value and having a third predetermined value if any of the bits of the corresponding data sub-string of the first data string has other than the second predetermined value; starting from a predetermined end of the second data string, counting the number of consecutive bits of the second data spring having the first predetermined value; and dividing the said number by the number of bits in each data sub-string.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A method for run-length encoding two or more data values, the method comprising: loading the data values into storage by forming a first data string, comprising a plurality of data sub-strings, each data sub-string having a number of bits and representing at least one of the data values; generating a second data string having a data sub-string corresponding to each data sub-string of the first data string, all the bits of each of the data sub-strings of the second data string having a first predetermined value if all the bits of the corresponding data sub-string of the first data string have a second predetermined value and having a third predetermined value if any of the bits of the corresponding data sub-string of the first data string has other than the second predetermined value; starting from a predetermined end of the second data string, counting the number of consecutive bits of the second data string having the first predetermined value; and dividing the said number by the number of bits in each data sub-string.
2. A method as claimed in claim 1 , wherein the first predetermined value is zero.
3. A method as claimed in claim 1 , wherein all the data sub-strings have the same length.
4. A method as claimed in claim 1 , wherein the second predetermined value is zero.
5. A method as claimed in claim 1 , wherein all the data sub-strings are at least two bits long.
6. A method as claimed in claim 1 , wherein the data values are loaded into a computer store in which the data sub-strings are not individually addressable.
7. A method as claimed in claim 1 , wherein the step of generating the second data string is performed by executing an instruction to compare the first data string with a third data string all of whose bits are of the second predetermined value.
8. A method as claimed in claim 1 , further comprising the step of generating a fourth data string by masking the first data string with the second data string.
9. A method as claimed in claim 1 , wherein the step of dividing is performed by executing a bit shift.
10. A data compression method according to claim 1 .
11. A computer comprising: processing means for processing data strings; a data memory for storing data strings, each data string comprising a plurality of data sub-strings; and a program memory for storing a series of instructions for the processing means to execute a method comprising steps according to claim 1 .
12. A computer as claimed in claim 11 , wherein the processing means includes dedicated apparatus for performing the step of generating the second data string.
13. The method of claim 1 , wherein the recited steps are operable to compress data.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
May 10, 2002
May 18, 2004
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.