In a computer system having processing means and storage means, a computer-implemented method of detecting and compressing identical consecutive runs of data units in a data processing system data string having a sequence of said data units, the computer-implemented method comprising steps of:
- exclusive-O-Ring by said processing means each consecutive pair of said data units in said sequence of data units to generate a comparison result for each said consecutive pair, said comparison result for each said consecutive pair having one of a first value indicating identical consecutive data units and a second value indicating different consecutive data units;
- storing in said storage means each said comparison result for said sequence of data units in a comparison string having a corresponding sequence;
- searching by said processing means said comparison string stored in said storage means to identify said comparison results having said first value, thereby locating identical consecutive runs of said data units in said sequence of data units in said data string;
- and
- compressing by said processing means the identical consecutive runs of data having a predetermined minimum run length in said sequence of data units in said data string located by said searching.