Skip to main content

ferray_io/
lib.rs

1// ferray-io: NumPy-compatible file I/O (.npy, .npz, memory-mapped, text)
2//
3//! This crate provides functions for reading and writing N-dimensional arrays
4//! in NumPy-compatible formats:
5//!
6//! - **`.npy`** — single array binary format ([`npy::save`], [`npy::load`], [`npy::load_dynamic`])
7//! - **`.npz`** — zip archive of `.npy` files ([`npz::savez`], [`npz::savez_compressed`])
8//! - **Text I/O** — delimited text files ([`text::savetxt`], [`text::loadtxt`], [`text::genfromtxt`])
9//! - **Memory mapping** — zero-copy file-backed arrays ([`memmap::memmap_readonly`], [`memmap::memmap_mut`])
10
11pub mod format;
12pub mod memmap;
13pub mod npy;
14pub mod npz;
15pub mod text;
16
17// Re-export the most commonly used items at crate root for convenience.
18pub use format::MemmapMode;
19pub use npy::{NpyElement, load, load_dynamic, save};
20pub use npz::{NpzFile, savez, savez_compressed};
21pub use text::{SaveTxtOptions, genfromtxt, loadtxt, savetxt};