Skip to main content

Crate stuffr_core

Crate stuffr_core 

Source
Expand description

Core abstractions for the stuffr toolkit.

This crate deliberately depends on no compression format crate. That constraint is what makes the stream ladder and the thread governor testable against mock formats, with no C toolchain and no real archives.

Re-exports§

pub use archive::ArchiveRead;
pub use archive::ArchiveWrite;
pub use archive::Codec;
pub use archive::Container;
pub use archive::CreateOpts;
pub use archive::DecodeOpts;
pub use archive::EncodeOpts;
pub use archive::Entry;
pub use archive::EntryKind;
pub use archive::EntryMeta;
pub use archive::OpenOpts;
pub use archive::PlainSink;
pub use archive::Sink;
pub use containment::safe_join;
pub use error::Error;
pub use error::Result;
pub use fidelity::Fidelity;
pub use fidelity::FidelityReport;
pub use fidelity::MetaFields;
pub use fidelity::Rung;
pub use format::CodecCaps;
pub use format::ContainerCaps;
pub use format::CorruptionDetection;
pub use format::FormatId;
pub use format::FormatKind;
pub use format::FormatMeta;
pub use format::MagicRule;
pub use governor::BudgetInputs;
pub use governor::Governor;
pub use governor::LeaseSet;
pub use governor::default_memory_limit;
pub use governor::resolve_workers;
pub use ladder::Resolved;
pub use ladder::StreamPolicy;
pub use ladder::resolve;
pub use probe::Chain;
pub use probe::PROBE_LEN;
pub use probe::chain_for_new_path;
pub use probe::probe;
pub use probe::resolve_chain;
pub use probe::resolve_chain_deep;
pub use probe::resolve_chain_deep_with;
pub use registry::FormatRow;
pub use registry::Registry;
pub use size::format_size;
pub use source::Counting;
pub use source::CountingWriter;
pub use source::DEFAULT_MAX_RATIO;
pub use source::FileSource;
pub use source::PeekSource;
pub use source::RATIO_FLOOR;
pub use source::RatioGuard;
pub use source::ReaderSource;
pub use source::SeekRead;
pub use source::Source;
pub use source::SourceCaps;
pub use source::SpillPolicy;
pub use source::SpillSource;
pub use source::StreamOnly;

Modules§

archive
The two orthogonal traits, and the entry model they share.
containment
Entry-path containment: the single decision point for whether an archive entry’s name (or a symlink’s target) may be written under a destination directory.
error
fidelity
format
governor
Central resource governance. Nothing in the codebase spawns a thread outside the governor.
ladder
The adaptive stream ladder.
probe
Format detection and pipeline resolution.
registry
Format registry: what this build actually contains.
size
Human-readable byte-count rendering.
source
Input abstraction. A container never opens a file — it asks a Source what it can do, and the ladder (see crate::ladder) supplies the best rung.

Constants§

VERSION