## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## Book Description

If you want to attract and retain users in the booming mobile services market, you need a quick-loading app that won’t churn through their data plans. The key is to compress multimedia and other data into smaller files, but finding the right method is tricky. This witty book helps you understand how data compression algorithms work—in theory and practice—so you can choose the best solution among all the available compression tools. With tables, diagrams, games, and as little math as possible, authors Colt McAnlis and Aleks Haecky neatly explain the fundamentals.

1. Foreword
2. Preface
3. 1. Let’s Not Be Boring
1. The Five Buckets of Compression Algorithms
2. Claude Shannon Is Infuriating!
3. The Only Thing You Need to Know about Data Compression
4. 2. Do Not Skip This Chapter
1. Understanding Binary
2. Information Theory
5. 3. Breaking Entropy
1. Understanding Entropy
2. What This Entropy Stuff Is Good For
3. Understanding Probability
4. Breaking Entropy
5. Information Theory Versus Data Compression
6. 4. Variable-Length Codes
1. Morse Code
2. Probability, Entropy, and Codeword Size
3. Variable-Length Codes
7. 5. Statistical Encoding
1. Statistically Compressing to Entropy
2. Huffman Coding
3. Arithmetic Coding
4. Asymmetric Numeral Systems
5. Practical Compression: Which Statistical Algorithm Do I Choose?
1. Locality Matters for Entropy
5. The Modern Choice
9. 7. Dictionary Transforms
1. A Basic Dictionary Transform
2. The Lempel-Ziv Algorithm
3. Collect Them All!
10. 8. Contextual Data Transforms
1. Run-Length Encoding
2. Delta Coding
3. Move-to-Front Coding
4. Burrows–Wheeler Transform
11. 9. Data Modeling
1. The Chains of Markov
2. Prediction by Partial Matching
3. Context Mixing
4. The Next Big Thing?
12. 10. Switching Gears
13. 11. Evaluating Compression
1. Compression Usage Scenarios
2. Compression Need
3. Compression Ratio
4. Compression Performance
5. Decompression Performance
6. Ability to Decode-Stream
7. Comparing Compressors
14. 12. Compressing Image Data Types
1. Understanding Quality Versus File Size
2. Image Dimensions Are Important
3. Choosing the Correct Image Format
4. GPU Texture Formats
5. Vector Formats
6. Eyes on the Prize
15. 13. Serialized Data
1. Understanding Common Use Cases
2. Issues with Serialized Formats
3. Smaller Serialized Data
16. 14. Lossy Data Compression
17. 15. Making the World a Little Smaller
1. Data Compression and You
2. Data Compression and the Bottom Line
3. Making Your Users’ Lives a Little More Magical and Less Expensive
4. Thinking About What’s Next in Technology
5. ...Starting Now
18. Glossary of Compression Words
19. Index