internalsGet Pro

Module 04 · Lesson 5 of 10Pro

Compression and encoding: smaller, faster files

Level
Intermediate
Topic
Data formats and file storage
Reading time
17 min

When you finish this page you can

  1. Explain the two layers that shrink a Parquet column, encoding and then a compression codec, and what each one can see.
  2. Predict which encoding a column gets (dictionary, run-length, delta or plain) from its distinct values and its row order.
  3. Choose a codec for files written once and read for months, and say what would change the choice.
  4. Measure a file’s real size per column with DuckDB instead of assuming a compression ratio.

Builds on 2 lessons

Start with lesson 113 min
  1. Row and columnar storage: why layout matters13 min
  2. Parquet: columnar files for analytics17 min

160 MB of text for 8 different words

is an online store in India. Its app records about 10 million click events a day, about 300 bytes each, so about 3 GB of raw clicks a day. Every night, Meera, a data engineer, exports the day’s clicks from to a file in Kartly’s storage in the AWS Mumbai region. Raw clicks are kept for 13 months, and the product team’s funnel reports read them.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan