{"id":24777,"library":"tzst","title":"tzst","description":"A Python library for creating and extracting TAR archives with Zstandard (zstd) compression. It provides a high-level API similar to Python's built-in tarfile but with superior compression ratios and performance. Current version 1.3.3, requires Python >=3.12.","status":"active","version":"1.3.3","language":"python","source_language":"en","source_url":"https://github.com/xixu-me/tzst","tags":["archive","compression","zstd","tar"],"install":[{"cmd":"pip install tzst","lang":"bash","label":"install from PyPI"}],"dependencies":[{"reason":"Python bindings to Zstandard compression library.","package":"zstandard","optional":false}],"imports":[{"wrong":"from tzst import open","symbol":"TzstArchive","correct":"from tzst import TzstArchive"},{"symbol":"create_archive","correct":"from tzst import create_archive"},{"symbol":"extract_archive","correct":"from tzst import extract_archive"}],"quickstart":{"code":"from tzst import open\nimport os\n\n# Create a tzst archive\nwith open('example.tar.zst', 'w') as tf:\n    tf.add('file1.txt')\n    tf.add('directory/')\n\n# Extract a tzst archive\nwith open('example.tar.zst', 'r') as tf:\n    tf.extractall(path='./extracted')\n\n# Compress existing tar file\nimport tarfile\nwith tarfile.open('example.tar', 'w') as tar:\n    tar.add('file1.txt')\n# then compress with zstd? Actually tzst handles it directly\n# For reading stream\nwith open('example.tar.zst', 'r') as tf:\n    for member in tf:\n        print(member.name)","lang":"python","description":"Basic usage: open a tzst archive with open() context manager, add files, extract all."},"warnings":[{"fix":"Upgrade Python to 3.12 or later.","message":"tzst requires Python >=3.12. Older Python versions will raise ImportError.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Always use from tzst import open.","message":"The open() function has a different signature from zstandard or tarfile. Do not use zstandard's open() as it produces raw zstd streams, not tzst archives.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.3.3':39 '3.12':42 'api':21 'archiv':10,43 'built':27 'built-in':26 'compress':14,33,44 'creat':6 'current':37 'extract':8 'high':19 'high-level':18 'level':20 'librari':4 'perform':36 'provid':16 'python':3,24,41 'ratio':34 'requir':40 'similar':22 'superior':32 'tar':9,46 'tarfil':29 'tzst':1 'version':38 'zstandard':12 'zstd':13,45","created_at":"2026-05-01T08:14:52.488309+00:00","updated_at":"2026-05-01T08:14:52.488309+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.3.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/xixu-me/tzst","docs":"https://github.com/xixu-me/tzst#readme","changelog":null,"pypi":"https://pypi.org/project/tzst/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}