skillfed

tzst

The next-generation Python library engineered for modern archive management, leveraging cutting-edge Zstandard compression to deliver superior performance, security, and reliability

tzst v1.3.3 207.0K downloads/30d#9,560 on PyPI57
Permissive license BSD-3-Clause Active released

What it is and what it does

tzst is a Python library for creating, extracting, and managing tar archives compressed with Zstandard. It provides both a command-line interface and a programmatic API, supporting atomic file operations, streaming for large archives, and configurable security filters during extraction. The library targets Python 3.12 and later, treating Zstandard compression as a first-class archive format alongside standard tar operations.

The package is built around the zstandard library and offers convenience functions for common tasks (create_archive, extract_archive, list_archive) as well as a lower-level TzstArchive class for fine-grained control. It emphasizes safe defaults—using the 'data' security filter by default during extraction—and provides both .tzst and .tar.zst extension support for compatibility.

Use it for:

  • Create compressed backups of directories with better compression ratios than gzip while maintaining tar compatibility.
  • Extract large archives in streaming mode to minimize memory usage on resource-constrained systems.
  • Automate archive operations in Python scripts using the API without spawning external processes.
  • Verify archive integrity before extraction to catch corruption early.
  • Distribute pre-built binaries or application bundles using Zstandard compression for faster downloads.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

tzst creates and extracts tar archives compressed with Zstandard, offering a Python API and command-line interface for archive management with streaming support and atomic operations.

Yes, if you need Zstandard-compressed tar archives in Python 3.12+. The library is actively maintained, has no known vulnerabilities, installs with minimal friction, and offers both CLI and API interfaces. The BSD-3-Clause license is permissive. Start with the convenience functions; use the TzstArchive class only if you need fine-grained control.

Install

tzst on PyPI

pip

pip install tzst

uv

uv add tzst

poetry

poetry add tzst

Installing tzst

Before you install

Low friction: pure Python wheel with a single runtime dependency (zstandard). Active maintenance with recent releases and a small but growing user base.

License in practice

BSD-3-Clause is permissive; you can use, modify, and distribute tzst freely in commercial and private projects with minimal restrictions.

Quickstart

pip install tzst

from tzst import create_archive, extract_archive

create_archive("archive.tzst", ["file.txt", "dir/"])
extract_archive("archive.tzst", "output/")

Requires Python 3.12 or later.

Verify before relying

  • Whether streaming mode provides measurable memory savings for archives of specific sizes.
  • Performance comparison with standard tar + gzip or other compression libraries in real-world scenarios.
  • Compatibility guarantees with archives created by other Zstandard tar tools.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.12)
Install friction low — pure-Python wheel
Runtime dependencies 1 — zstandard
Maintenance actively maintained — 125 days since the last release
Last repo commit
First released
Downloads 206,955/month — #9,560 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tzst-1.3.3-py3-none-any.whl

Keywords: archive, compression, tar, zstandard

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Archiving :: Compression

Tags

tar zstandard compressiontzst archive creationzstandard tar librarypython archive compressionstreaming tar extractionzst archive managementtar.zst python
archivingcompressioncli-tool

More Python Modules packages