PythonAsia 2026

PythonAsia 2026

Zstandard in Python 3.14 Faster Compression You Can Use Today
2026-03-21 , Pardo Hall (Secondary Hall)

Zstandard is now first class in Python via the new compression.zstd module, bringing fast, high ratio compression to everyday workflows. This talk introduces Zstandard for Python developers, explains how it differs from gzip, bzip2, and LZMA, and shows clear benchmarks of compression ratio and speed. You will learn one‑shot, streaming, and incremental APIs, plus dictionary training for many small similar payloads. We will cover real scenarios such as log pipelines, HTTP payloads, data lakes, and packaging, including how integration with zipfile and tarfile improves usability. What is new is the unified compression namespace in Python 3.14 with an official Zstandard wrapper that simplifies API discovery and cross‑version compatibility. Compared to traditional choices, you can achieve smaller downloads and dramatically faster extraction while keeping CPU and memory costs reasonable. Attendees leave with practical patterns, compatibility tips, and reproducible tests to pick the right algorithm for their workloads.


Introduction and goals (3 min)
• Explains the session’s objectives: empowering attendees to use Python 3.14’s compression.zstd for faster, smaller data handling in real-world scenarios.

Comparing gzip, bzip2, and LZMA trade-offs (7 min)
• Outlines strengths and weaknesses of gzip, bz2, lzma and zlib in terms of speed, compression ratio, and resource usage.
• Shows benchmark results and discusses how these legacy choices impact log pipelines, HTTP payloads, and data lakes.

Zstandard and the new compression namespace (8 min)
• Introduces the compression.zstd module and unified compression namespace in Python 3.14, explaining improvements in API consistency and discoverability.
• Details Zstandard’s architecture, focusing on its performance, dictionary support, and integration with zipfile and tarfile.

Demos: streaming, dictionaries, benchmarks (8 min)
• Demonstrates compress and decompress APIs, ZstdFile for streaming, and incremental usage with ZstdCompressor and ZstdDecompressor.
• Shows how to train dictionaries for many small, similar payloads and presents real benchmarks comparing speed, ratio, and resource consumption.

Q&A and wrap-up (4 min)
• Addresses migration tips, cross-version compatibility, cost considerations, and practical scenarios for adopting compression.zstd.
• Provides resources, reproducible test patterns, and guidance for further exploration and immediate adoption.


Category: Core Python/Advanced Language Features Audience Level: Beginner

Yu Saito is currently working as a Solution Engineer for Azure at Microsoft Japan. Prior to joining Microsoft, Yu was a graduate student specializing in bioinformatics. During this time, he developed machine learning models to accelerate molecular dynamics simulations. This experience sparked his interest in Python, which continues to be a key area of expertise.