-
Notifications
You must be signed in to change notification settings - Fork 54
Home
Aaron Boxer edited this page Mar 26, 2026
·
14 revisions
Grok is an open-source JPEG 2000 codec licensed under AGPL v3.
- High Throughput JPEG 2000 (HTJ2K) — Part 15 support
- Random-access sub-image decoding — TLM + PLT markers
-
Cloud storage — Read JPEG 2000 files directly from AWS S3, Azure Blob, Google Cloud Storage, and Azure Data Lake via
/vsis3/,/vsiaz/,/vsigs/,/vsiadls/paths - Async/swath-based decompression — Used by the JP2Grok GDAL driver for streaming large images
- ICC color profiles, XML/IPTC/XMP/EXIF metadata
- Color spaces — Monochrome, sRGB, palette, YCC, extended YCC, CIELab, CMYK
- 1–16 bit precision
-
MJ2 (Motion JPEG 2000) — Multi-frame compress and decompress for
.mj2containers, with per-sample C API - I/O formats — JPEG, PNG, BMP, TIFF, RAW, PNM, PAM, PGX, MJ2
- Language bindings — Python, C#, Java (SWIG), Rust (bindgen)
- Platforms — Linux (x86-64/AArch64), Windows, macOS, WebAssembly
Benchmark results (16 threads, GDAL release build, Fedora 42):
| Workflow | Grok (JP2Grok) | Kakadu (JP2KAK) | OpenJPEG |
|---|---|---|---|
| Spot 6 (Network Storage) | 35.17 s | 344 s | 85 s |
| Spot 6 (Local Storage) | 26.92 s | 30.57 s | 52.09 s |
| Pleiades (Region) | 0.74 s | 1.41 s | 4.28 s |
- 2,000+ unit tests
- Continuous fuzzing via OSS-Fuzz
- grk_decompress — Decompress JPEG 2000 to other formats
- grk_compress — Compress images to JPEG 2000
- grk_dump — Inspect JPEG 2000 file headers
-
Cloud Storage / S3 Support — AWS S3, Azure, GCS, ADLS, HTTP
-
Environment Variables — GRK_DEBUG, cloud config, and more
-
Language Bindings — Python, C#, Java, Rust
-
GDAL Integration — JP2Grok driver
-
Async Decompression API — Swath-based tile retrieval for library users
-
MJ2 (Motion JPEG 2000) — Multi-frame compress/decompress CLI and C API
git clone --recursive https://github.com/GrokImageCompression/grok.git
cd grok
cmake -B build
cmake --build build --parallel
See INSTALL.md for full build instructions including WebAssembly and platform-specific details.