Table of Contents
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
LAC — Lo Audio Codec
LAC is a lossless audio codec: integer-only, bit-exact, streaming-oriented. Designed for real-time voice (QUIC / MCU conferencing) and offline file compression. Compression is FLAC-class on speech (0.96-0.99× FLAC size) and within 5-7% of FLAC on music, while meeting realtime deadlines with hundreds of times' headroom on every platform tested (x86-64, aarch64, riscv64).
Install
# Cargo.toml
[dependencies]
lac = "0.1"
Rust 1.87+. no_std with alloc.
Minimal example
use lac::{encode_frame, decode_frame};
let samples: Vec<i32> = /* signed integer PCM, |s| ≤ 2²³ − 1 */ Vec::new();
let bytes = encode_frame(&samples);
let recovered = decode_frame(&bytes)?;
assert_eq!(recovered, samples);
# Ok::<(), lac::DecodeError>(())
Full API reference at docs.rs/lac. Buffer-reusing
(encode_frame_into / decode_frame_into), MCU fanout patterns, and
packet-loss concealment strategies are all in the repository's README.
Wiki contents
- Specification — the normative wire format. This is the authority on byte layout, field semantics, and encoder/decoder constraints. Second-team implementations should work from here.
- Security Policy — vulnerability reporting, supported versions, disclosure timeline.
Project links
- Repository: git.lo.sh/lo/lac
- Crate: crates.io/crates/lac
- API docs: docs.rs/lac
- License: AGPL-3.0-only
Status
Pre-1.0 (0.1.x). Wire format is stable — frames encoded by 0.1.0 will
decode correctly on any future version with sync word 0x1ACC. Public
API may still change; all changes follow semver within the 0.x range.
LAC is licensed under AGPL-3.0-only. Source: git.lo.sh/lo/lac.