Expand description
JPEG XL encoder in pure Rust.
This crate provides a complete JPEG XL encoder implementation, supporting both lossless (modular) and lossy (VarDCT) encoding modes.
Re-exports§
pub use api::AnimationFrame;pub use api::AnimationParams;pub use api::EncodeError;pub use api::EncodeMode;pub use api::EncodeRequest;pub use api::EncodeResult;pub use api::EncodeStats;pub use api::ImageMetadata;pub use api::Limits;pub use api::LosslessConfig;pub use api::LossyConfig;pub use api::Lz77Method;pub use api::PixelLayout;pub use api::Quality;
Modules§
- api
- Three-layer public API: Config → Request → Encoder.
- bit_
writer - BitWriter for encoding JPEG XL bitstreams.
- color
- Color space transforms for JPEG XL encoding.
- container
- JXL container format (ISOBMFF boxes) for metadata embedding.
- entropy_
coding - Entropy coding for JPEG XL encoder.
- error
- Error types for the JPEG XL encoder.
- headers
- Header structures and serialization for JPEG XL.
- image
- Image buffer types for the JPEG XL encoder.
- modular
- Modular encoding for JPEG XL.
- trace
- Zero-cost bitstream tracing for debugging encoder output.
- vardct
- VarDCT (lossy) encoder for JPEG XL.
Macros§
- at
- Start tracing an error with crate metadata for repository links.
- debug_
eprintln - debug_
log - Debug log macro - writes to
<temp_dir>/jxl_enc_debug.logwhen debug-tokens feature is enabled. - debug_
log_ flush - Debug log macro that also flushes (use sparingly, for important checkpoints).
- trace_
bytes - trace_
note - trace_
section - trace_
write
Structs§
- At
- An error with location tracking - wraps any error type.
- Unstoppable
- A
Stopimplementation that never stops (no cooperative cancellation).
Constants§
- BLOCK_
DIM - DCT block dimension (8x8 blocks).
- BLOCK_
SIZE - Size of a single DCT block (64 coefficients).
- GROUP_
DIM - Group dimension in pixels (256x256 groups).
- JXL_
SIGNATURE - JXL signature bytes.
Traits§
- Result
AtExt - Extension trait for adding location tracking to
Result<T, At<E>>. - Stop
- Cooperative cancellation check.
Functions§
- at
- Wrap any value in
At<E>and capture the caller’s location.