12.07.2015 Views

Data Compression: The Complete Reference

Data Compression: The Complete Reference

Data Compression: The Complete Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.17 LZP 211Step Input Add to dict. Current matchesabcabcabcabcabcabcabcx1 a — a2 b 256-ab b3 c 257-bc c4 a 258-ca a5 b — ab, b6 c 259-abc bc, c7 a 260-bca ca, a8 b 261-cab ab, b9 c — abc, bc, c10 a 262-abca bca, ca, a11 b 263-bcab cab, ab, b12 c 264-cabc abc, bc, c13 a — abca, bca, ca, a14 b 265-abcab bcab, cab, ab, b15 c 266-bcabc cabc, abc, bc, c16 a 267-cabca abca, bca, ca, a17 b — abcab, bcab, cab, ab, b18 c 268-abcabc bcabc, cabc, abc, bc, c19 a 269-bcabca cabca, abca, bca, ca, a20 b 270-cabcab abcab, bcab, cab, ab, b21 c — abcabc, bcabc, cabc, abc, bc, c22 x 271-abcabcx x23 272-bcabcx24 273-cabcx25 274-abcx26 275-bcx27 276-cx3.17 LZPTable 3.26: LZY Example.This LZ77 variant is due to Charles Bloom [Bloom 96] (the P stands for “prediction”). Itis based on the principle of context prediction, which says, “if a certain string ‘abcde’hasappeared in the input stream in the past and was followed by ‘fg...’, then when ‘abcde’appears again in the input stream, there is a good chance that it will be followed by thesame ‘fg...’.” Section 3.30 should be consulted for the relation between dictionarybasedand prediction algorithms.Figure 3.27 shows an LZ77 sliding buffer with “fgh...” as the current symbols(this string is denoted by S) in the look-ahead buffer, immediately preceded by abcde inthe search buffer. <strong>The</strong> string abcde is called the context of “fgh...” and is denoted byC. In general, the context of a string S is the N-symbol string C immediately to the leftof S. A context can be of any length N, and variants of LZP, discussed in Sections 3.17.3and 3.17.4, use different values of N. <strong>The</strong> algorithm passes the context through a hash

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!