flacx
flacx is the reusable Rust library in this workspace.
It provides encode, decode, and recompress workflows for supported PCM
containers and FLAC.
flacxis still experimental, so APIs and format support may change.
Quick start
Add the crate to your project:
The default feature set enables WAV, AIFF, and CAF support. If you want to select features yourself, start with:
[]
= { = "0.11.0", = false, = ["wav", "progress"] }
For one-shot file workflows, use the built-in helpers:
use ;
For finer control, use the reset API:
PcmReader for PCM-container inputs, read_flac_reader for FLAC inputs,
EncoderConfig / DecodeConfig / RecompressConfig for session policy, and
inspect_pcm_total_samples when you need a preflight sample count without a
full decode.
Feature flags
wav— WAV, RF64, and Wave64 supportaiff— AIFF and AIFC supportcaf— CAF supportprogress— progress snapshots and callbacks
Reference
For the full API, examples, and module documentation, see the rustdoc on
https://docs.rs/flacx or run cargo doc -p flacx --open.