pyferrite 0.0.1

Pure-Rust reader/writer for Python ML artefacts (npy, npz, pickle, pt, joblib, hdf5) with ndarray and polars interop, lazy streaming and user-controlled numeric down-casting.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Minimal, pure-Rust ZIP reader/writer for `.npz` and `.pt` containers.
//!
//! Only the two methods those producers use are implemented — *stored* (0) and
//! *deflate* (8) — plus ZIP64 extents, which `torch.save` emits for large
//! checkpoints. This avoids pulling in the `zip` crate and its transitive
//! C-backed compressors.

mod read;
mod write;

pub use read::{ZipEntry, ZipReader};
pub use write::ZipWriter;

/// Compression method identifiers as stored in the ZIP headers.
pub const METHOD_STORE: u16 = 0;
/// `METHOD_DEFLATE`.
pub const METHOD_DEFLATE: u16 = 8;