Grok is an open-source JPEG 2000 codec licensed under AGPL v3.
Grok is integrated into GDAL. 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 |
GRK_INT_32 and GRK_INT_16 input. GRK_INT_16 supports signed precision up to 16 bits and unsigned precision up to 15 bits. Use grk_compress_get_recommended_data_type() to detect the direct 16-bit compression path.For direct API compression, call grk_compress_get_recommended_data_type() after configuring compression and plugin state, then use its result when allocating component data. It returns GRK_INT_16 only when compression retains a 16-bit tile buffer.
For standard MCT, query all three components and use GRK_INT_32 for all three if any query returns it. GRK_INT_32 remains valid when the function recommends GRK_INT_16.
Multi-tile callers may still choose accepted GRK_INT_16 input outside the direct path to reduce source-buffer memory, at the cost of widening each tile.
grk_transcode)grk_transcode rewrites JP2/J2K files at the packet level — no full decompression required. Supported operations:
--max-layers)--max-res)Example — add TLM + PLT markers to an existing file:
grk_transcode -i input.jp2 -o output.jp2 -X -L
git clone --recursive https://github.com/GrokImageCompression/grok.git
cd grok
cmake -B build
cmake --build build --parallel
2 commits
C++
79.3%
Rust
7.7%
Python
5.0%
C
4.3%
CMake
3.3%
Grok is an open-source JPEG 2000 codec licensed under AGPL v3.
Grok is integrated into GDAL. 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 |
GRK_INT_32 and GRK_INT_16 input. GRK_INT_16 supports signed precision up to 16 bits and unsigned precision up to 15 bits. Use grk_compress_get_recommended_data_type() to detect the direct 16-bit compression path.For direct API compression, call grk_compress_get_recommended_data_type() after configuring compression and plugin state, then use its result when allocating component data. It returns GRK_INT_16 only when compression retains a 16-bit tile buffer.
For standard MCT, query all three components and use GRK_INT_32 for all three if any query returns it. GRK_INT_32 remains valid when the function recommends GRK_INT_16.
Multi-tile callers may still choose accepted GRK_INT_16 input outside the direct path to reduce source-buffer memory, at the cost of widening each tile.
grk_transcode)grk_transcode rewrites JP2/J2K files at the packet level — no full decompression required. Supported operations:
--max-layers)--max-res)Example — add TLM + PLT markers to an existing file:
grk_transcode -i input.jp2 -o output.jp2 -X -L
git clone --recursive https://github.com/GrokImageCompression/grok.git
cd grok
cmake -B build
cmake --build build --parallel
2 commits
C++
79.3%
Rust
7.7%
Python
5.0%
C
4.3%
CMake
3.3%