i | log i | J=j | W | a | DICT[i] |
1 | 0 | empty | empty | 0 | 0 |
2 | 1 | (1)2=1 | 0 | 1 | 01 |
3 | 2 | (10)2=2 | 01 | 0 | 010 |
4 | 2 | (11)2=3 | 010 | 0 | 0100 |
5 | 3 | (100)2=4 | 0100 | 1 | 01001 |
6 | 3 | (101)2=5 | 01001 | 1 | 010011 |
7 | 3 | (011)2=3 | 010 | 1 | 0101 |
i | log i | J=j | W=DICT[i-1] | a | DICT[i] | x= (previous(x))(Wa) |
1 | 0 | empty | empty | 0 | 0 | 0 |
2 | 1 | (1)2=1 | 0 | 1 | 01 | 001 |
3 | 2 | (10)2=2 | 01 | 0 | 010 | 001010 |
4 | 2 | (11)2=3 | 010 | 0 | 0100 | 0010100100 |
5 | 3 | (100)2=4 | 0100 | 1 | 01001 | 001010010001001 |
6 | 3 | (101)2=5 | 01001 | 1 | 010011 | 001010010001001010011 |
7 | 3 | (011)2=3 | 010 | 1 | 0101 | 0010100100010010100110101 |
101 | 110 |
111 | 011 |
|
|
|
5 | 5 | 6 | 5 | 5 | 4 |
5 | 4 | 6 | 5 | 4 | 4 |
4 | 4 | 5 | 4 | 5 | 5 |
3 | 3 | 4 | 3 | 4 | 4 |
2 | 3 | 4 | 3 | 2 | 3 |
1 | 2 | 3 | 2 | 1 | 2 |
I
| IG
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I0: 24 runs
| IG0: 17 runs
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I1:16 runs
| IG1:9 runs
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I2:8 runs
| IG2:8 runs
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Total number of runs: 48 | Total number of runs: 34 |
Symbols | Huffman Code |
---|---|
1 | 1 |
2 | 01 |
3 | 011 |
4 | 0100 |
5 | 0101 |
6 | 00010 |
9 | 00000 |
18 | 00001 |
21 | 00011 |
Symbols | Huffman Code |
---|---|
1 | 1 |
2 | 01 |
3 | 0011 |
4 | 0010 |
5 | 00000 |
9 | 0011 |
18 | 00001 |
Standards | Compression |
---|---|
JBIG and JBIG 2 | Arithmetic coding |
Grayscale and color JBIG | bitplane + Arithmetic coding |
Lossless JPEG | DPCM |
Fax: - Group 3 - Extended 2D Group 3 - Group 4 | RLE and Huffman coding |
Graphic Format | Compression |
---|---|
BMP (Microsoft) | RLE |
GIF (CompuServe) | LZW |
TIFF | Choice of Group 3, Group 4, LZW, or RLE |
PNG | a variant of LZ77 (optionally preceded with a DPCM at the byte level) |
MIFF (X Window) | RLE or DPCM |
PIX (SGI IRIS) | RLE |
BW (SGI IRIS) | RLE |
Utility | Compression |
---|---|
Compress (Unix) | LZW |
gzip (Unix) | A variant of LZ77 (Lempel-Ziv 1977) |
Comments: The following graphic file formats do not use compression: PBM, PGM, PPM, PNM, RAS (SUN Raster file format), PCX