Files
xixu-me 8de8ec0356 Add social media metadata to documentation
Updated multiple documentation files to include Open Graph and Twitter metadata for better social media sharing. Added a new logo image to the static assets folder and referenced it in the metadata.
2025-06-06 22:15:54 +08:00

3.4 KiB

myst
myst
html_meta
description keywords og:title og:description twitter:title twitter:description og:type og:image og:url twitter:card twitter:image
Complete tzst API reference - Core functions, CLI tools, and exception handling for tar.zst archives tzst API, Python API documentation, tar.zst API reference, archive API tzst API Reference Complete API reference for tzst - Core functions, CLI tools, and exception handling tzst API Reference Complete API reference for tzst - Core functions, CLI tools, and exception handling website https://tzst.xi-xu.me/_static/tzst-square-logo.png https://tzst.xi-xu.me/ summary_large_image https://tzst.xi-xu.me/_static/tzst-square-logo.png

API Reference

This section contains the complete API documentation for tzst, providing detailed information about classes, functions, and exceptions.

:maxdepth: 2

core
cli
exceptions

Overview

The tzst library provides both high-level convenience functions and a comprehensive class-based API for working with .tzst/.tar.zst archives. The library is designed with security, performance, and ease of use in mind.

Main Components

  • {doc}core: Core functionality including TzstArchive class and convenience functions for archive operations
  • {doc}cli: Command-line interface functions and utilities for batch operations
  • {doc}exceptions: Custom exception classes for comprehensive error handling and debugging

Architecture Overview

The tzst library follows a layered architecture:

  1. High-Level API: Convenience functions for common operations
  2. Class-Based API: TzstArchive class for advanced control
  3. CLI Interface: Command-line tools for interactive and scripted use
  4. Exception System: Comprehensive error handling for robust applications

Quick Reference

Core Classes

.. currentmodule:: tzst

.. autosummary::
   :nosignatures:
   
   TzstArchive

The main class for archive manipulation with context manager support and comprehensive functionality.

Convenience Functions

.. autosummary::
   :nosignatures:
   
   create_archive
   extract_archive
   list_archive
   test_archive

High-level functions that provide simple interfaces for common archive operations.

CLI Functions

.. currentmodule:: tzst.cli

.. autosummary::
   :nosignatures:
   
   main
   create_parser
   print_banner
   format_size
   validate_compression_level

Command-line interface utilities for interactive and batch operations.

Exception Classes

.. currentmodule:: tzst.exceptions

.. autosummary::
   :nosignatures:
   
   TzstError
   TzstArchiveError
   TzstCompressionError
   TzstDecompressionError

Exception hierarchy for comprehensive error handling and debugging support.

Key Features

Security First

  • Built-in path traversal protection
  • Multiple security filter options
  • Safe extraction by default

High Performance

  • Zstandard compression with configurable levels
  • Streaming support for large archives
  • Memory-efficient operations

Developer Friendly

  • Clean, Pythonic API
  • Comprehensive error handling
  • Context manager support
  • Extensive documentation and examples

Cross-Platform

  • Works on Windows, macOS, and Linux
  • Consistent behavior across platforms
  • Native performance optimizations