Skip to main content

Blazing fast, multi-threaded SIMD ZIP extraction library

Project description

Hayazip

日本語 | English

🚀 Blazing Fast, Multi-Threaded SIMD ZIP Extraction Library for Rust & Python

hayazip is an ultra-fast ZIP archive extraction library designed from the ground up to leverage modern hardware capabilities. It combines memory-mapped I/O, SIMD-accelerated decompression (via libdeflater), and thread-pool-based parallel extraction (via rayon) to achieve up to 10x faster extraction latency compared to the standard Unix unzip utility.

Features

  • Zero-Copy Parsers: Uses memmap2 to map the ZIP file directly into memory, skipping expensive kernel-to-user-space copies.
  • SIMD Optimized Decompression: Powered by libdeflater to leverage AVX2, AVX-512, or NEON depending on the architecture.
  • Multi-threaded Extraction: Uses rayon in a Fork-Join model to decompress and extract independent files in parallel securely.
  • Hardware-accelerated CRC32: Validates integrity using hardware instructions through crc32fast.
  • Cross-platform Python Bindings: Built with PyO3 for easy, out-of-the-box integration in any Python environment.

Python Quick Start

Installation

You can install hayazip directly from PyPI (binary wheels available for Linux, macOS, and Windows):

pip install hayazip

Usage

Extracting archives in Python is easy and significantly faster than the standard zipfile module:

import hayazip

archive_path = "huge_archive.zip"
output_dir = "extracted_files"

# Extracts the entire archive fully utilizing all CPU cores
hayazip.extract_zip(archive_path, output_dir)
print("Done!")

Rust Quick Start

Add hayazip to your Cargo.toml:

[dependencies]
hayazip = "0.1.0"

Usage

use hayazip::extract;

fn main() {
    let archive_path = "huge_archive.zip";
    let output_dir = "extracted_files";

    if let Err(e) = extract(archive_path, output_dir) {
        eprintln!("Extraction failed: {}", e);
    } else {
        println!("Extraction successful!");
    }
}

Benchmarks

Extracting a 50MB realistically compressed test archive with 10 files (5MB each):

  • unzip (Unix standard): ~162ms
  • hayazip: ~16ms (10x faster)

Build from Source (Python)

To compile from source and install into your local Python environment:

pip install maturin
maturin develop --release

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hayazip-0.1.0-cp314-cp314-win_amd64.whl (67.7 kB view details)

Uploaded CPython 3.14Windows x86-64

hayazip-0.1.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (9.7 kB view details)

Uploaded CPython 3.14macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

hayazip-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (191.0 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file hayazip-0.1.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: hayazip-0.1.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 67.7 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for hayazip-0.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 9cbc4b8bd1206d9ba806c2dd775abf2a2f64f155fad0e3b899ad9c73224e683f
MD5 60d638c4868761b70f5a6a1ef6f5b5b4
BLAKE2b-256 7d478d989462bf5644546baaf2517fa0029da0219901da88b9ec165d719311e7

See more details on using hashes here.

File details

Details for the file hayazip-0.1.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for hayazip-0.1.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 5e64b1bb9667e066ada2c1f07d1e42b4f65d15c50035ea91a2c24ff1806f7900
MD5 b1fdddaea38134aec040ecfdbb8a67da
BLAKE2b-256 21d5fcf261d90159c012d5a3956861e6d343af99121af39c6b8a0253dcd4db15

See more details on using hashes here.

File details

Details for the file hayazip-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for hayazip-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba551f03b5bb241b3e05b897385e994dd4ac58313d1a2bac697ed303ee5f2f60
MD5 8ac86d48e141ca36901058cc2e7f6ac3
BLAKE2b-256 b81ecba965100ca1963174a0a216019f5367f372d6a2ebef32feca5e4d863891

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page