Skip to main content

Crate jxl_encoder

Crate jxl_encoder 

Source
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.log when 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 Stop implementation 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§

ResultAtExt
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.