Skip to main content

Crate limnifs_write

Crate limnifs_write 

Source
Expand description

LimniFS writer pipeline — directory tree to .lim image.

The writer takes a real directory tree and produces a valid .lim manifest artifact with inlined metadata. Files at or below the inline threshold (4 KiB) are stored as inline data in their inodes; larger files are stored as drops packed into a single slab.

§Usage

use std::path::Path;
use limnifs_write::write_directory;
let artifact = write_directory(Path::new("/path/to/dir"))?;
std::fs::write("output.lim", &artifact.bytes)?;

Modules§

chunker
Content-defined chunking via FastCDC (Xia et al., 2016).
classifier
Drop classifier (seine): entropy + magic-byte heuristics.
compaction
Slab compaction — removes unreferenced drops from a slab without re-reading file contents. Preserves codecs, drop identities, and metadata; only the slab and manifest’s slab index / history change.
delta_builder
Delta builder — computes tree operations between two images.
flatten
Metadata-only flattener — merge N manifests into a single composite manifest with zero drop-store I/O.
turnover
Turnover — tier-3 full re-encode defrag.

Structs§

WriteArtifact
Result of writing a directory tree.

Enums§

WriteError
Error during writing.

Constants§

INLINE_THRESHOLD
Inline-data threshold: files at or below this size get inline data in their inode. Larger files are stored as drops in a slab.

Functions§

write_directory
Walk a directory tree and produce a valid .lim manifest artifact with inlined metadata. Files at or below INLINE_THRESHOLD bytes are stored inline; larger files are packed into a single slab as content-addressed drops.