# US 2003/0212695 A1 · Lossless data compression system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2003/0212695 A1
- Document ID: US20030212695A1
- Status: Published application
- Kind: A1
- Application number: 10/137,437
- Filed: 2002-05-03
- Published: 2003-11-13
- Earliest claimed: 2002-05-03
- Inventors: Jorma Rissanen
- Web page: https://patentgrep.com/patent/US20030212695A1

## CPC

- H03M 7/30: Compression (speech analysis-synthesis for redundancy reduction G10L19/00; for image communication H04N); Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- Y10S 707/99932: Access augmentation or optimizing
- Y10S 707/99933: Query processing, i.e. searching
- Y10S 707/99936: Pattern matching access
- Y10S 707/99937: Sorting
- Y10S 707/99942: Manipulating data structure, e.g. compression, compaction, compilation
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

The present invention relates to a method for forming a maximal tree for compressing information comprising symbols, in which said maximal tree is generated by searching statistical data of different symbols from a training data. In the method a table is formed, in which each row consists of a string having a first end and a second end, and a symbol of the training data in said first end, the rest of the string consisting of a minimal number of preceding symbols in the training data to make the so-defined context unique for said symbol. The contexts are sorted in lexical order with priority on the first end. The invention also relates to a device comprising means for forming a maximal tree for compressing information comprising symbols, in which said maximal tree is generated by searching statistical data of different symbols from a training data. The device comprises means for forming a table, in which each row consists of a string having a first end and a second end, and a symbol of the training data in said first end, the rest of the string consisting of a minimal number of preceding symbols in the training data to make the so-defined context unique for said symbol. The device further comprises means for sorting the contexts in lexical order with priority on the first end.

## Claims

### Claim 1

A method for forming a maximal tree for compressing information comprising symbols, in which said maximal tree is generated by searching statistical data of different symbols from a training data, wherein a table is formed, in which each row consists of a string having a first end and a second end, and a symbol of the training data in said first end, the rest of the string consisting of a minimal number of preceding symbols in the training data to make the so-defined context unique for said symbol; and the contexts are sorted in lexical order with priority on the first end.

### Claim 2 (depends on 1)

A method according to claim 1, wherein probabilities {circumflex over (P)}i|s are assigned to the symbols i that may occur at the context s.

### Claim 3 (depends on 2)

method according to claim 2, wherein the probabilities {circumflex over (P)}i|s are assigned by using the following Equation:
13 P ^ i ❘ s = ( m + 1 / 2 ( n s + 1 ) ⁢ ( d - m ) if ⁢ ⁢ 0 < m < d / 2 ⁢ ⁢ and ⁢ ⁢ n s > 1 d - m n s ⁡ ( d - m ) = 1 n s if ⁢ ⁢ d / 2 ≤ m < d 0 if ⁢ ⁢ m = d 1 / d if ⁢ ⁢ n s = 1 ,
in which
d is the number of symbols in the alphabet, and
m is the number of distinct symbols among the ns occurrences of symbols at context s.

### Claim 4 (depends on 2)

method according to claim 2, wherein the probabilities {circumflex over (P)}i|s are assigned by using the following Equation:
14 P ^ i ❘ s = ( ( 1 - m + 1 / 2 n s + 1 ) ⁢ n i ❘ s n s if ⁢ ⁢ 0 < m < d / 2 ⁢ ⁢ and ⁢ ⁢ n s > 1 n s - 1 n s ⁢ n i ❘ s n s if ⁢ ⁢ d / 2 ≤ m < d n i ❘ s n s if ⁢ ⁢ m = d 1 / d if ⁢ ⁢ n s = 1 ,
in which
d is the number of symbols in the alphabet, and
m is the number of distinct symbols among the ns occurrences of symbols at context s.

### Claim 4 (depends on 1)

A method according to claim 1, wherein the subtrees of the maximal tree are obtained by combining adjacent contexts into a new context defined by a common suffix, symbol occurrence counts of the adjacent contexts are obtained; and wherein the subtrees are specified and stored in terms of pointers to a Burrows-Wheeler transformed data string defined by the last column of a table representing the maximal tree.

### Claim 5 (depends on 4)

A method according to claim 4, wherein the maximal tree and the subtree are represented as tables, said subtree being selected so that it permits encoding the training data within a preset excess percentage p of the minimum code length achievable by any subtree, and wherein the subtree is formed by using the following steps:
Initialization step, in which leaves L(s)=log d, where d is the size of the alphabet, and L(s)=I(s)=0 for all other nodes.
Calculation step, in which two code lengths are calculated recursively, from the leaves upwards, from the positive counts of the symbol occurrences ni|sj at the son node sj of the father node s, the first code length being
15 I ⁡ ( s ⁢ ⁢ j ) = - ∑ i ⁢ n i ❘ s ⁢ ⁢ j ⁢ log ⁢ P ^ i ❘ s ,
where the symbol probability estimates {circumflex over (P)}i|s are calculated by using the Equation
16 P ^ i ❘ s = ( ( 1 - m + 1 / 2 n s + 1 ) ⁢ n i ❘ s n s if ⁢ ⁢ 0 < m < d / 2 ⁢ ⁢ and ⁢ ⁢ n s > 1 n s - 1 n s ⁢ n i ❘ s n s if ⁢ ⁢ d / 2 ≤ m < d n i ❘ s n s if ⁢ ⁢ m = d 1 / d if ⁢ ⁢ n s = 1 ,
and the second code length being L(s), representing the optimal code length for the same symbols, defined by L(s)=L(s)+L(sj), if I(sj)>max {(1+p)L(sj), L′(sj)} or I(sj)>L(sj)+t; else defined by L(s)=L(s)+I(sj)
Repeating the above steps until the root is reached.

### Claim 6 (depends on 4)

A method according to claim 4, wherein the final optimal subtree is stored by storing its generating data string that visits all the contexts of OTM, the storing consisting of the following steps:
forming the set of contexts S by using the following rules: the context of every leaf node of the tree is included; for each node s that has exactly one pruned child js the context js is included; for every node s that has more than one pruned children, context λs is included;
generating the shortest exact common superstring xk for the set of strings S;
converting xk to the generating string yk by Burrows-Wheeler transform.

### Claim 7

A device comprising means for forming a maximal tree for compressing information comprising symbols, in which said maximal tree is generated by searching statistical data of different symbols from a training data, wherein the device comprises means for forming a table, in which each row consists of a string having a first end and a second end, and a symbol of the training data in said first end, the rest of the string consisting of a minimal number of preceding symbols in the training data to make the so-defined context unique for said symbol; and the device further comprising means for sorting the contexts in lexical order with priority on the first end.

### Claim 8 (depends on 7)

A device according to claim 7, wherein in it is a general purpose computer.

### Claim 9 (depends on 7)

A device according to claim 7, wherein in it is a mobile phone.

### Claim 10 (depends on 7)

A device according to claim 7, wherein in it is a hand held device intended to compress at least one of the following: short messages, emails or web addresses.

### Claim 11 (depends on 7)

A device according to claim 7, wherein in it is a game machine.
