Skip to content
Aaron Boxer edited this page Mar 26, 2026 · 14 revisions

Welcome to the Grok wiki!

Grok is an open-source JPEG 2000 codec licensed under AGPL v3.

Features

  • 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 .mj2 containers, 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

Performance

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

Testing

  • 2,000+ unit tests
  • Continuous fuzzing via OSS-Fuzz

Documentation

Command-Line Tools

  1. grk_decompress — Decompress JPEG 2000 to other formats
  2. grk_compress — Compress images to JPEG 2000
  3. grk_dump — Inspect JPEG 2000 file headers

Guides

  1. Cloud Storage / S3 Support — AWS S3, Azure, GCS, ADLS, HTTP

  2. Environment Variables — GRK_DEBUG, cloud config, and more

  3. Language Bindings — Python, C#, Java, Rust

  4. GDAL Integration — JP2Grok driver

  5. Async Decompression API — Swath-based tile retrieval for library users

  6. MJ2 (Motion JPEG 2000) — Multi-frame compress/decompress CLI and C API

Reference

  1. Additional Test Images
  2. Gigapixel Test Images
  3. JPEG 2000 Standard and Related Documents

Quick Build

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.

Links

Clone this wiki locally