Safe public Rust APIs for JPEG 2000 Part 1 and HTJ2K Part 15 inspection, decode, encode, recode, and coefficient-domain JPEG-to-HTJ2K transcode workflows.
CPU is the correctness baseline. CUDA and Apple Metal backends accelerate supported paths.
Release statusSee the changelog and crates.io for the current published version.
JPEG 2000 Part 1◆HTJ2K Part 15◆JP2 / JPH◆CPU baseline◆CUDA backend◆Metal backend◆JPEG 2000 Part 1◆HTJ2K Part 15◆JP2 / JPH◆CPU baseline◆CUDA backend◆Metal backend◆
01 / Public surface
Why J2K exists
01
Safety
Safe public Rust APIs
The public codec surface is safe Rust. Unsafe code is limited to FFI, GPU integration, architecture-specific SIMD/intrinsic, allocation, and bounded pointer or buffer boundaries, and every host-side unsafe block explains why it is sound.
02
Routing
GPU-accelerated backends
Applications keep a portable CPU path and can send supported workloads to CUDA or Apple Metal.
03
Benchmarks
Permissive integration
The workspace is dual-licensed MIT or Apache-2.0. Published speed numbers come with the commands, hardware, and inputs needed to reproduce them.
02 / Architecture
Architecture
J2K/JP2 and HTJ2K/JPH still images are handled by one crate. The CPU path is the reference implementation; CUDA and Metal speed up the shapes they support.
System map / static topology
Auto returns CPU output when no GPU path is available, supported, or measured faster for the shape. Explicit CUDA and Metal requests never fall back.
03 / Supported formats
Supported formats
Exact coverage is maintained in the public support matrix.
In scope
JPEG 2000 Part 1
Raw J2K/J2C codestream parse, inspect, decode, encode, ROI, progression, tile-part, packet-marker, signed, high-bit, and component-plane surfaces are tracked by the public support matrix.
In scope
HTJ2K Part 15
HT cleanup and refinement decode/encode, quality layers, rate behavior, raw HT codestreams, and JPH still-image wrapping are in scope.
Limits
Wrappers and limits
JP2 and JPH still-image metadata is supported. JPX / JPEG 2000 Part 2 extensions are not.