Expand description
Memory-mapped dataset for efficient large file access.
Provides MmapDataset which memory-maps Parquet files for efficient
access without loading the entire file into memory.
§Safety
This module uses unsafe code for memory mapping via memmap2.
The unsafe operations are limited to:
Mmap::map()- Memory mapping a file, which is inherently unsafe because external modifications to the file could cause undefined behavior.
These operations are safe in practice when:
- The file is not modified while mapped
- The file system supports memory mapping
§Example
use alimentar::{Dataset, MmapDataset};
// Memory-map a large parquet file
let dataset = MmapDataset::open("large_data.parquet").unwrap();
println!("Dataset has {} rows", dataset.len());
// Access rows without loading entire file
if let Some(row) = dataset.get(1000) {
println!("Row 1000: {:?}", row);
}Structs§
- Mmap
Dataset - A memory-mapped dataset backed by a Parquet file.
- Mmap
Dataset Builder - Builder for configuring
MmapDatasetoptions.