Metadata-Version: 2.1
Name: zstd-bin
Version: 1.5.5
Summary: Zstandard - Fast real-time compression algorithm
Keywords: zstd,zstandard,compression
Author-Email: Todd Gao <todd.gao.2013@gmail.com>
License: BSD License
         
         For Zstandard software
         
         Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
         
         Redistribution and use in source and binary forms, with or without modification,
         are permitted provided that the following conditions are met:
         
          * Redistributions of source code must retain the above copyright notice, this
            list of conditions and the following disclaimer.
         
          * Redistributions in binary form must reproduce the above copyright notice,
            this list of conditions and the following disclaimer in the documentation
            and/or other materials provided with the distribution.
         
          * Neither the name Facebook, nor Meta, nor the names of its contributors may
            be used to endorse or promote products derived from this software without
            specific prior written permission.
         
         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
         ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
         WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
         ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
         (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
         LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
         ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
         (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
         SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
         
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: C
Classifier: Topic :: System :: Archiving :: Compression
Project-URL: repository, https://github.com/czudf/zstd-bin
Project-URL: homepage, https://facebook.github.io/zstd/
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# zstd-bin

Precompiled zstd binaries distributed as Python wheels.

## Installation

```bash
pip install zstd-bin
```

After installation, the `zstd` command will be available in your PATH:

```bash
zstd --version
```

## Usage

This package provides the `zstd` command-line tool. All zstd commands work as expected:

```bash
# Compress a file
zstd file.txt

# Decompress
zstd -d file.txt.zst

# View help
zstd --help
```

## Supported Platforms

- Linux x86_64 (manylinux_2_28, glibc 2.28+)
- Linux aarch64 (manylinux_2_28, glibc 2.28+)
- macOS arm64 (macOS 11.0+)
- macOS x86_64 (macOS 11.0+)

## Building from Source

This package automatically compiles zstd from source when building wheels.

To build locally:

```bash
# Clone with submodules
git clone --recurse-submodules https://github.com/czudf/zstd-bin

# Or if already cloned, initialize submodules
git submodule update --init --recursive

# Install uv (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Build wheel for your platform (automatically compiles zstd from source)
uv build --wheel

# Test installation
uv venv .venv
uv pip install --no-index -f dist/ zstd-bin
.venv/bin/zstd --version
```

The build process:
1. Automatically detects your platform (Linux/macOS, x86_64/aarch64)
2. Compiles zstd from the included git submodule (zstd/)
3. Creates a platform-specific wheel with the compiled binary

## License

This package distributes zstd binaries which are licensed under BSD-3-Clause.
See https://github.com/facebook/zstd for the original zstd project.

## Acknowledgments

This project was inspired by and learned from [pip-binary-factory](https://github.com/Bing-su/pip-binary-factory), which provides an excellent framework for distributing precompiled binaries via Python wheels.

## Repository

https://github.com/czudf/zstd-bin
