Book contents
- Frontmatter
- Dedication
- Contents
- Preface
- 1 Introduction
- 2 A Warm-up
- 3 Random Sampling
- 4 List Ranking
- 5 Sorting Atomic Items
- 6 Set Intersection
- 7 Sorting Strings
- 8 The Dictionary Problem
- 9 Searching Strings by Prefix
- 10 Searching Strings by Substring
- 11 Integer Coding
- 12 Statistical Coding
- 13 Dictionary-Based Compressors
- 14 Block-Sorting Compression
- 15 Compressed Data Structures
- 16 Conclusion
- Index
13 - Dictionary-Based Compressors
Published online by Cambridge University Press: 08 June 2023
- Frontmatter
- Dedication
- Contents
- Preface
- 1 Introduction
- 2 A Warm-up
- 3 Random Sampling
- 4 List Ranking
- 5 Sorting Atomic Items
- 6 Set Intersection
- 7 Sorting Strings
- 8 The Dictionary Problem
- 9 Searching Strings by Prefix
- 10 Searching Strings by Substring
- 11 Integer Coding
- 12 Statistical Coding
- 13 Dictionary-Based Compressors
- 14 Block-Sorting Compression
- 15 Compressed Data Structures
- 16 Conclusion
- Index
Summary
This chapter describes another family of compressors that do not derive statistics about the text to be compressed; rather, they derive a dictionary of strings and substitute their occurrences in the input text via proper references to that dictionary. The choice of the dictionary is of course crucial in determining how well the file is compressed, and it is sometimes ineffective to transmit the full dictionary along with each compressed file. Starting in 1977, Abraham Lempel and Jacob Ziv introduced a family of compressors that successfully addressed these problems by designing two algorithms, named LZ77 and LZ78, that process the input text to incrementally construct a proper dictionary that is, thus, not transmitted. The Lempel–Ziv compressors are very popular because of their gzip instantiation, and constitute the base of more sophisticated compressors in use today, such as 7zip, LZMA, Brotli, and LZ4. The chapter discusses LZ77, LZ78, and an interesting variant, known as LZW, and at the end presents some theoretical considerations about the effectiveness of those compressors in terms of the empirical entropy of the compressed text.
- Type
- Chapter
- Information
- Pearls of Algorithm Engineering , pp. 240 - 251Publisher: Cambridge University PressPrint publication year: 2023