Skip to main content

Crate rusty_flac

Crate rusty_flac 

Source
Expand description

§rusty_flac — pure-Rust FLAC codec

A self-contained FLAC encoder + decoder: no FFI, no dependencies.

  • Encoder: feed planar or interleaved i32 samples (8/16/24-bit, up to 8 channels), get a complete spec-valid FLAC stream with STREAMINFO MD5.
  • Decoder: streaming per-frame decode of a FLAC stream to planar i32, with CRC verification; decode is the whole-stream convenience.

Lossless is the invariant: decode(encode(x)) == x exactly, and every stream interoperates with libFLAC/ffmpeg in both directions.

Structs§

Decoder
Streaming FLAC decoder over a complete in-memory stream.
EncodeStats
Wiring-audit counters: every decision path in the encoder counts what it chose, so a corpus run can prove no path is silently dead and no fallback is silently hot. Cheap (a few increments per subframe).
Encoder
A pure-Rust FLAC encoder. Feed planar or interleaved i32 samples at the configured bit depth, then Encoder::finish returns the complete stream.
StreamInfo
Parsed STREAMINFO.

Enums§

DecodeError
EncodeError
Encoder configuration / stream errors.

Functions§

decode
Decode a complete FLAC stream to (StreamInfo, planar samples).