Skip to main content

Crate deepshrink_core

Crate deepshrink_core 

Source
Expand description

deepshrink-core — the pure, testable core of DeepShrink.

No I/O side effects: size/preset parsing, file-type detection and the engine contract (Engine). The heavy lifting (invoking ffmpeg) happens in a concrete engine’s run layer; here we keep the math and types, unit-tested.

Re-exports§

pub use detect::detect_kind;
pub use detect::MediaKind;
pub use engine::media::MediaEngine;
pub use engine::AudioSpec;
pub use engine::EncodePlan;
pub use engine::EncodeSpec;
pub use engine::Engine;
pub use engine::EngineError;
pub use engine::MediaInfo;
pub use engine::Outcome;
pub use engine::ShrinkOpts;
pub use engine::SizeGoal;
pub use engine::VideoSpec;
pub use options::AudioChoice;
pub use options::AudioCodec;
pub use options::FpsOpt;
pub use options::QualityPreset;
pub use options::ResolutionOpt;
pub use options::VideoCodec;
pub use size::parse_percent;
pub use size::parse_size;
pub use size::preset;
pub use size::Preset;
pub use size::SizeError;

Modules§

budget
Pure bitrate-budgeting math for fitting media into a target size.
detect
File-type detection → which engine to use.
engine
The compression engine contract and shared types.
options
Encoding option enums shared between the CLI and the engine.
size
Human-readable size parsing and platform presets.