Rust Crate API
Public symbols for the Rust crate qualix: ClipInfo, Color, Decoder, Frame, MemoryUsage, Encoder, and RateMode.
Playback-only native runtimes should disable default encoder features:
TOMLqualix = { version = "0.1.0", default-features = false }
Metadata & constants
SIGNATURE: [u8; 3] = *b"QLX",FORMAT_VERSION: u8,ADAPTIVE_QUANTIZATION: u8 = 255,MAX_FRAMES: u32 = 1 << 24,DEFAULT_BUDGET: usize = 160 * 1024 * 1024enum Color { Srgb8 = 1, Pq10 = 2, Hlg10 = 3 }struct ClipInfo(width,height,fps_num,fps_den,frames,key_interval,color,drop_bits) withframe_bytes(),validate(), andClipInfo::read(&mut impl Read).
Decoder (qualix::decode)
Decoder::open(reader: R, budget: usize) -> io::Result<Self>(R: Read + Seek) — Validates header, EOF key index, and working-set budget before allocating internal reference canvas storage.Decoder::open_into(reader: R, budget: usize, pixels: &'a mut [u8]) -> io::Result<Self>— Reconstructs directly into a caller-lentwidth × height × 4buffer with zero extra frame copy.decoder.info() -> ClipInfoanddecoder.memory_usage() -> MemoryUsage(surface,key_index,block_scratch,.bytes()).decoder.decode(&mut self, frame: u32) -> io::Result<Frame<'_>>— Decodes sequentially or across arbitrary keyframes, returningFrame { pixels: &[u8], dirty_rows: Range<u32> }.
Encoder (encode feature)
Encoder::new(writer: W, info: ClipInfo) -> io::Result<Self>(W: Write) with search builderswith_raw_keys(),with_fast_search(),with_playback_search(),with_dense_search().write_frame(&mut self, pixels: &[u8]),finish(self), andfinish_counted(self).encode_bitrate(self, input, writer, mode: RateMode, bps: u64) -> io::Result<RateReport>supportingRateMode::VbrandRateMode::Cbr.