oximedia-io
I/O layer for the OxiMedia multimedia framework, providing async media sources, bit-level reading, buffered I/O, memory-mapped files, checksums, compression, and pipeline I/O utilities.
Part of the oximedia workspace — a comprehensive pure-Rust media processing framework.
Features
- Media Sources — Async file, memory, and seekable sources
- Bit-Level I/O — Bit reader with Exp-Golomb coding for binary format parsing
- Aligned I/O — Memory-aligned I/O for optimal DMA performance
- Buffered I/O — Read-ahead buffering with configurable buffer sizes
- Memory-Mapped I/O — mmap-based zero-copy file access
- Scatter-Gather I/O — Vectorized I/O for multi-buffer operations
- Chunked Writing — Write large files in chunks with progress tracking
- Copy Engine — High-throughput async file copy
- Checksum — CRC32, CRC64, SHA-256, BLAKE3 checksumming
- Compression — zstd, LZ4, gzip, bzip2 compress/decompress
- Progress Reader — Async reader with progress callback
- Rate Limiter — Bandwidth-limited I/O for upload/download throttling
- Ring Buffer — Lock-free ring buffer for streaming
- Splice Pipe — Zero-copy splice between descriptors (Linux)
- Temp Files — Secure temporary file creation and management
- Verification I/O — Read-back verification for write integrity
- Write Journal — Journaled writes for crash-safe I/O
- File Metadata — Extended file metadata (size, timestamps, permissions)
- File Watch — File system event watching
- I/O Pipeline — Composable I/O pipeline stages
- I/O Stats — Throughput and latency statistics
Usage
Add to your Cargo.toml:
[]
= "0.1.1"
File Source
use ;
async
BitReader
use BitReader;
Checksum
use ;
let mut checksum = new;
checksum.update;
let digest = checksum.finalize;
API Overview
Core types:
MediaSource— Unified async trait for media accessFileSource— Tokio async file sourceMemorySource— In-memory bytes sourceBitReader— Bit-level binary reader with Exp-Golomb support
Modules:
source— Media source traits and implementationsbits— Bit-level I/O and Exp-Golomb codingaligned_io— Memory-aligned I/Oasync_io— Async I/O abstractionsbuffered_io— Buffered read-ahead I/Ommap— Memory-mapped file accessscatter_gather— Vectorized scatter-gather I/Oseekable— Seekable source utilitieschunked_writer— Chunked file writingcopy_engine— High-throughput async copychecksum— CRC32/CRC64/SHA-256/BLAKE3 checksumscompression— zstd/LZ4/gzip/bzip2 compress/decompressprogress_reader— Progress-reporting async readerrate_limiter— Bandwidth throttlingring_buffer— Lock-free ring buffersplice_pipe— Zero-copy splice (Linux)temp_files— Secure temporary file managementverify_io— Write verificationwrite_journal— Journaled writesfile_metadata— Extended file metadatafile_watch— File system watcherio_pipeline— Composable I/O pipelineio_stats— I/O throughput and latency statisticsbuffer_pool— Buffer pool for I/O operations
Design Principles
All I/O operations are async by default, built on tokio. MemorySource uses bytes::Bytes for zero-copy buffer sharing.
License
Apache-2.0 — Copyright 2024-2026 COOLJAPAN OU (Team Kitasan)