|
| 1 | +# Symbol compatibility |
| 2 | + |
| 3 | +Coverage of the zstd C API by the `io.github.dfa1.zstdffm` bindings. |
| 4 | + |
| 5 | +- zstd version: **1.6.0** (vendored `third_party/zstd`) |
| 6 | +- Public symbols exported by `libzstd`: **186** |
| 7 | +- Bound so far: **29** (~16%) |
| 8 | + |
| 9 | +"Bound" means the symbol has a `MethodHandle` in `Bindings` and is reachable |
| 10 | +through the public Java API. The rest are reachable from native code but not yet |
| 11 | +surfaced. Many unbound symbols are deprecated, experimental, or static-buffer / |
| 12 | +low-level variants that an idiomatic Java API does not need. |
| 13 | + |
| 14 | +> Regenerate the symbol list with |
| 15 | +> `nm -gjU libzstd.dylib | sed 's/^_//' | grep -E '^(ZSTD|ZDICT)_'`. |
| 16 | +
|
| 17 | +## Coverage by area |
| 18 | + |
| 19 | +| Area | Bound / Total | Notes | |
| 20 | +|---|:---:|---| |
| 21 | +| Core one-shot | 6 / 7 | compress/decompress/bound/levels — complete for practical use | |
| 22 | +| Version | 2 / 2 | complete | |
| 23 | +| Errors | 2 / 4 | name-based; typed `getErrorCode`/`getErrorString` not bound | |
| 24 | +| Reusable contexts | 6 / 8 | CCtx/DCtx create/free/compress/decompress | |
| 25 | +| Dictionary — simple | 8 / 23 | raw + digested (CDict/DDict); `_advanced`/`_byReference` variants not bound | |
| 26 | +| Dictionary training (ZDICT) | 4 / 12 | `trainFromBuffer`; cover/fastCover optimizers not bound | |
| 27 | +| Streaming — compress | 0 / 24 | **not bound** — no incremental compression yet | |
| 28 | +| Streaming — decompress | 0 / 13 | **not bound** — no incremental decompression yet | |
| 29 | +| Advanced parameters | 0 / 38 | **not bound** — no `setParameter` (checksum, nbWorkers, LDM, window…) | |
| 30 | +| Frame inspection | 1 / 13 | only `getFrameContentSize`; header/skippable/dictID-from-frame not bound | |
| 31 | +| Memory sizing | 0 / 14 | `sizeof_*` / `estimate*` accounting not bound | |
| 32 | +| Low-level block | 0 / 12 | expert block/continue API not bound | |
| 33 | +| Sequences | 0 / 5 | sequence producer API not bound | |
| 34 | +| Misc / experimental | 0 / 11 | static-buffer init, param helpers, `copy*` not bound | |
| 35 | + |
| 36 | +## Bound symbols → Java |
| 37 | + |
| 38 | +| Native | Java surface | |
| 39 | +|---|---| |
| 40 | +| `ZSTD_compress`, `ZSTD_decompress`, `ZSTD_compressBound` | `Zstd.compress` / `decompress` / `compressBound` | |
| 41 | +| `ZSTD_maxCLevel`, `ZSTD_minCLevel`, `ZSTD_defaultCLevel` | `Zstd.maxCompressionLevel` / `minCompressionLevel` / `defaultCompressionLevel` | |
| 42 | +| `ZSTD_versionNumber`, `ZSTD_versionString` | `Zstd.version` | |
| 43 | +| `ZSTD_isError`, `ZSTD_getErrorName` | internal error mapping in `Zstd` | |
| 44 | +| `ZSTD_getFrameContentSize` | `Zstd.decompress(byte[])`, `Zstd.decompressedSize` | |
| 45 | +| `ZSTD_createCCtx`, `ZSTD_freeCCtx`, `ZSTD_compressCCtx` | `ZstdCompressCtx` | |
| 46 | +| `ZSTD_createDCtx`, `ZSTD_freeDCtx`, `ZSTD_decompressDCtx` | `ZstdDecompressCtx` | |
| 47 | +| `ZSTD_compress_usingDict` | `ZstdCompressCtx.compress(byte[], ZstdDictionary)` | |
| 48 | +| `ZSTD_decompress_usingDict` | `ZstdDecompressCtx.decompress(byte[], int, ZstdDictionary)` | |
| 49 | +| `ZSTD_createCDict`, `ZSTD_freeCDict`, `ZSTD_compress_usingCDict` | `ZstdCompressDict` | |
| 50 | +| `ZSTD_createDDict`, `ZSTD_freeDDict`, `ZSTD_decompress_usingDDict` | `ZstdDecompressDict` | |
| 51 | +| `ZDICT_trainFromBuffer` | `ZstdDictionary.train` | |
| 52 | +| `ZDICT_getDictID` | `ZstdDictionary.id` | |
| 53 | +| `ZDICT_isError`, `ZDICT_getErrorName` | internal error mapping in `ZstdDictionary` | |
| 54 | + |
| 55 | +## Roadmap (priority order) |
| 56 | + |
| 57 | +1. **Streaming** — `ZstdCompressStream` / `ZstdDecompressStream` over `MemorySegment` buffers (`compressStream2`, `decompressStream`, `flush`/`endStream`). |
| 58 | +2. **Advanced parameters** — `ZSTD_CCtx_setParameter` + `cParam_getBounds`: checksums, `nbWorkers`, long-distance matching, window log, `pledgedSrcSize`. |
| 59 | +3. **Frame inspection** — `getFrameHeader`, `isFrame`, `findFrameCompressedSize`, `decompressBound`, `getDictID_from*`, skippable frames. |
| 60 | +4. **Better dictionaries** — `ZDICT_optimizeTrainFromBuffer_cover` / `_fastCover`, `finalizeDictionary`. |
| 61 | +5. **Typed errors** — `ZSTD_getErrorCode` / `ZSTD_getErrorString`. |
| 62 | + |
| 63 | +## Full symbol table |
| 64 | + |
| 65 | +<!-- generated; see the nm command above to regenerate --> |
| 66 | + |
| 67 | +### Core one-shot (6/7) |
| 68 | + |
| 69 | +| Symbol | Bound | |
| 70 | +|---|:---:| |
| 71 | +| `ZSTD_compress` | ✅ | |
| 72 | +| `ZSTD_compressBound` | ✅ | |
| 73 | +| `ZSTD_decompress` | ✅ | |
| 74 | +| `ZSTD_defaultCLevel` | ✅ | |
| 75 | +| `ZSTD_maxCLevel` | ✅ | |
| 76 | +| `ZSTD_minCLevel` | ✅ | |
| 77 | +| `ZSTD_compress_advanced` | — | |
| 78 | + |
| 79 | +### Version (2/2) |
| 80 | + |
| 81 | +| Symbol | Bound | |
| 82 | +|---|:---:| |
| 83 | +| `ZSTD_versionNumber` | ✅ | |
| 84 | +| `ZSTD_versionString` | ✅ | |
| 85 | + |
| 86 | +### Errors (2/4) |
| 87 | + |
| 88 | +| Symbol | Bound | |
| 89 | +|---|:---:| |
| 90 | +| `ZSTD_getErrorName` | ✅ | |
| 91 | +| `ZSTD_isError` | ✅ | |
| 92 | +| `ZSTD_getErrorCode` | — | |
| 93 | +| `ZSTD_getErrorString` | — | |
| 94 | + |
| 95 | +### Reusable contexts (6/8) |
| 96 | + |
| 97 | +| Symbol | Bound | |
| 98 | +|---|:---:| |
| 99 | +| `ZSTD_compressCCtx` | ✅ | |
| 100 | +| `ZSTD_createCCtx` | ✅ | |
| 101 | +| `ZSTD_createDCtx` | ✅ | |
| 102 | +| `ZSTD_decompressDCtx` | ✅ | |
| 103 | +| `ZSTD_freeCCtx` | ✅ | |
| 104 | +| `ZSTD_freeDCtx` | ✅ | |
| 105 | +| `ZSTD_createCCtx_advanced` | — | |
| 106 | +| `ZSTD_createDCtx_advanced` | — | |
| 107 | + |
| 108 | +### Dictionary — simple (8/23) |
| 109 | + |
| 110 | +| Symbol | Bound | |
| 111 | +|---|:---:| |
| 112 | +| `ZSTD_compress_usingCDict` | ✅ | |
| 113 | +| `ZSTD_compress_usingDict` | ✅ | |
| 114 | +| `ZSTD_createCDict` | ✅ | |
| 115 | +| `ZSTD_createDDict` | ✅ | |
| 116 | +| `ZSTD_decompress_usingDDict` | ✅ | |
| 117 | +| `ZSTD_decompress_usingDict` | ✅ | |
| 118 | +| `ZSTD_freeCDict` | ✅ | |
| 119 | +| `ZSTD_freeDDict` | ✅ | |
| 120 | +| `ZSTD_compress_usingCDict_advanced` | — | |
| 121 | +| `ZSTD_compressBegin_usingCDict` | — | |
| 122 | +| `ZSTD_compressBegin_usingCDict_advanced` | — | |
| 123 | +| `ZSTD_compressBegin_usingDict` | — | |
| 124 | +| `ZSTD_createCDict_advanced` | — | |
| 125 | +| `ZSTD_createCDict_advanced2` | — | |
| 126 | +| `ZSTD_createCDict_byReference` | — | |
| 127 | +| `ZSTD_createDDict_advanced` | — | |
| 128 | +| `ZSTD_createDDict_byReference` | — | |
| 129 | +| `ZSTD_decompressBegin_usingDDict` | — | |
| 130 | +| `ZSTD_decompressBegin_usingDict` | — | |
| 131 | +| `ZSTD_getDictID_fromCDict` | — | |
| 132 | +| `ZSTD_getDictID_fromDDict` | — | |
| 133 | +| `ZSTD_getDictID_fromDict` | — | |
| 134 | +| `ZSTD_getDictID_fromFrame` | — | |
| 135 | + |
| 136 | +### Dictionary training, ZDICT (4/12) |
| 137 | + |
| 138 | +| Symbol | Bound | |
| 139 | +|---|:---:| |
| 140 | +| `ZDICT_getDictID` | ✅ | |
| 141 | +| `ZDICT_getErrorName` | ✅ | |
| 142 | +| `ZDICT_isError` | ✅ | |
| 143 | +| `ZDICT_trainFromBuffer` | ✅ | |
| 144 | +| `ZDICT_addEntropyTablesFromBuffer` | — | |
| 145 | +| `ZDICT_finalizeDictionary` | — | |
| 146 | +| `ZDICT_getDictHeaderSize` | — | |
| 147 | +| `ZDICT_optimizeTrainFromBuffer_cover` | — | |
| 148 | +| `ZDICT_optimizeTrainFromBuffer_fastCover` | — | |
| 149 | +| `ZDICT_trainFromBuffer_cover` | — | |
| 150 | +| `ZDICT_trainFromBuffer_fastCover` | — | |
| 151 | +| `ZDICT_trainFromBuffer_legacy` | — | |
| 152 | + |
| 153 | +### Streaming — compress (0/24) |
| 154 | + |
| 155 | +| Symbol | Bound | |
| 156 | +|---|:---:| |
| 157 | +| `ZSTD_CStreamInSize` | — | |
| 158 | +| `ZSTD_CStreamOutSize` | — | |
| 159 | +| `ZSTD_compressStream` | — | |
| 160 | +| `ZSTD_compressStream2` | — | |
| 161 | +| `ZSTD_compressStream2_simpleArgs` | — | |
| 162 | +| `ZSTD_createCStream` | — | |
| 163 | +| `ZSTD_createCStream_advanced` | — | |
| 164 | +| `ZSTD_endStream` | — | |
| 165 | +| `ZSTD_estimateCStreamSize` | — | |
| 166 | +| `ZSTD_estimateCStreamSize_usingCCtxParams` | — | |
| 167 | +| `ZSTD_estimateCStreamSize_usingCParams` | — | |
| 168 | +| `ZSTD_flushStream` | — | |
| 169 | +| `ZSTD_freeCStream` | — | |
| 170 | +| `ZSTD_initCStream` | — | |
| 171 | +| `ZSTD_initCStream_advanced` | — | |
| 172 | +| `ZSTD_initCStream_srcSize` | — | |
| 173 | +| `ZSTD_initCStream_usingCDict` | — | |
| 174 | +| `ZSTD_initCStream_usingCDict_advanced` | — | |
| 175 | +| `ZSTD_initCStream_usingDict` | — | |
| 176 | +| `ZSTD_initStaticCStream` | — | |
| 177 | +| `ZSTD_resetCStream` | — | |
| 178 | +| `ZSTD_sizeof_CStream` | — | |
| 179 | + |
| 180 | +### Streaming — decompress (0/13) |
| 181 | + |
| 182 | +| Symbol | Bound | |
| 183 | +|---|:---:| |
| 184 | +| `ZSTD_DStreamInSize` | — | |
| 185 | +| `ZSTD_DStreamOutSize` | — | |
| 186 | +| `ZSTD_createDStream` | — | |
| 187 | +| `ZSTD_createDStream_advanced` | — | |
| 188 | +| `ZSTD_estimateDStreamSize` | — | |
| 189 | +| `ZSTD_estimateDStreamSize_fromFrame` | — | |
| 190 | +| `ZSTD_freeDStream` | — | |
| 191 | +| `ZSTD_initDStream` | — | |
| 192 | +| `ZSTD_initDStream_usingDDict` | — | |
| 193 | +| `ZSTD_initDStream_usingDict` | — | |
| 194 | +| `ZSTD_initStaticDStream` | — | |
| 195 | +| `ZSTD_resetDStream` | — | |
| 196 | +| `ZSTD_sizeof_DStream` | — | |
| 197 | + |
| 198 | +### Advanced parameters (0/38) |
| 199 | + |
| 200 | +| Symbol | Bound | |
| 201 | +|---|:---:| |
| 202 | +| `ZSTD_CCtxParams_getParameter` | — | |
| 203 | +| `ZSTD_CCtxParams_init` | — | |
| 204 | +| `ZSTD_CCtxParams_init_advanced` | — | |
| 205 | +| `ZSTD_CCtxParams_registerSequenceProducer` | — | |
| 206 | +| `ZSTD_CCtxParams_reset` | — | |
| 207 | +| `ZSTD_CCtxParams_setParameter` | — | |
| 208 | +| `ZSTD_CCtx_getParameter` | — | |
| 209 | +| `ZSTD_CCtx_loadDictionary` | — | |
| 210 | +| `ZSTD_CCtx_loadDictionary_advanced` | — | |
| 211 | +| `ZSTD_CCtx_loadDictionary_byReference` | — | |
| 212 | +| `ZSTD_CCtx_refCDict` | — | |
| 213 | +| `ZSTD_CCtx_refPrefix` | — | |
| 214 | +| `ZSTD_CCtx_refPrefix_advanced` | — | |
| 215 | +| `ZSTD_CCtx_refThreadPool` | — | |
| 216 | +| `ZSTD_CCtx_reset` | — | |
| 217 | +| `ZSTD_CCtx_setCParams` | — | |
| 218 | +| `ZSTD_CCtx_setFParams` | — | |
| 219 | +| `ZSTD_CCtx_setParameter` | — | |
| 220 | +| `ZSTD_CCtx_setParametersUsingCCtxParams` | — | |
| 221 | +| `ZSTD_CCtx_setParams` | — | |
| 222 | +| `ZSTD_CCtx_setPledgedSrcSize` | — | |
| 223 | +| `ZSTD_DCtx_getParameter` | — | |
| 224 | +| `ZSTD_DCtx_loadDictionary` | — | |
| 225 | +| `ZSTD_DCtx_loadDictionary_advanced` | — | |
| 226 | +| `ZSTD_DCtx_loadDictionary_byReference` | — | |
| 227 | +| `ZSTD_DCtx_refDDict` | — | |
| 228 | +| `ZSTD_DCtx_refPrefix` | — | |
| 229 | +| `ZSTD_DCtx_refPrefix_advanced` | — | |
| 230 | +| `ZSTD_DCtx_reset` | — | |
| 231 | +| `ZSTD_DCtx_setFormat` | — | |
| 232 | +| `ZSTD_DCtx_setMaxWindowSize` | — | |
| 233 | +| `ZSTD_DCtx_setParameter` | — | |
| 234 | +| `ZSTD_cParam_getBounds` | — | |
| 235 | +| `ZSTD_compress2` | — | |
| 236 | +| `ZSTD_createCCtxParams` | — | |
| 237 | +| `ZSTD_dParam_getBounds` | — | |
| 238 | +| `ZSTD_estimateCCtxSize_usingCCtxParams` | — | |
| 239 | +| `ZSTD_freeCCtxParams` | — | |
| 240 | + |
| 241 | +### Frame inspection (1/13) |
| 242 | + |
| 243 | +| Symbol | Bound | |
| 244 | +|---|:---:| |
| 245 | +| `ZSTD_getFrameContentSize` | ✅ | |
| 246 | +| `ZSTD_decompressBound` | — | |
| 247 | +| `ZSTD_findDecompressedSize` | — | |
| 248 | +| `ZSTD_findFrameCompressedSize` | — | |
| 249 | +| `ZSTD_frameHeaderSize` | — | |
| 250 | +| `ZSTD_getDecompressedSize` | — | |
| 251 | +| `ZSTD_getFrameHeader` | — | |
| 252 | +| `ZSTD_getFrameHeader_advanced` | — | |
| 253 | +| `ZSTD_getFrameProgression` | — | |
| 254 | +| `ZSTD_isFrame` | — | |
| 255 | +| `ZSTD_isSkippableFrame` | — | |
| 256 | +| `ZSTD_readSkippableFrame` | — | |
| 257 | +| `ZSTD_writeSkippableFrame` | — | |
| 258 | + |
| 259 | +### Memory sizing (0/14) |
| 260 | + |
| 261 | +| Symbol | Bound | |
| 262 | +|---|:---:| |
| 263 | +| `ZSTD_decodingBufferSize_min` | — | |
| 264 | +| `ZSTD_decompressionMargin` | — | |
| 265 | +| `ZSTD_estimateCCtxSize` | — | |
| 266 | +| `ZSTD_estimateCCtxSize_usingCParams` | — | |
| 267 | +| `ZSTD_estimateCDictSize` | — | |
| 268 | +| `ZSTD_estimateCDictSize_advanced` | — | |
| 269 | +| `ZSTD_estimateDCtxSize` | — | |
| 270 | +| `ZSTD_estimateDDictSize` | — | |
| 271 | +| `ZSTD_getBlockSize` | — | |
| 272 | +| `ZSTD_sequenceBound` | — | |
| 273 | +| `ZSTD_sizeof_CCtx` | — | |
| 274 | +| `ZSTD_sizeof_CDict` | — | |
| 275 | +| `ZSTD_sizeof_DCtx` | — | |
| 276 | +| `ZSTD_sizeof_DDict` | — | |
| 277 | + |
| 278 | +### Low-level block (0/12) |
| 279 | + |
| 280 | +| Symbol | Bound | |
| 281 | +|---|:---:| |
| 282 | +| `ZSTD_compressBegin` | — | |
| 283 | +| `ZSTD_compressBegin_advanced` | — | |
| 284 | +| `ZSTD_compressBlock` | — | |
| 285 | +| `ZSTD_compressContinue` | — | |
| 286 | +| `ZSTD_compressEnd` | — | |
| 287 | +| `ZSTD_decompressBegin` | — | |
| 288 | +| `ZSTD_decompressBlock` | — | |
| 289 | +| `ZSTD_decompressContinue` | — | |
| 290 | +| `ZSTD_insertBlock` | — | |
| 291 | +| `ZSTD_nextInputType` | — | |
| 292 | +| `ZSTD_nextSrcSizeToDecompress` | — | |
| 293 | +| `ZSTD_toFlushNow` | — | |
| 294 | + |
| 295 | +### Sequences (0/5) |
| 296 | + |
| 297 | +| Symbol | Bound | |
| 298 | +|---|:---:| |
| 299 | +| `ZSTD_compressSequences` | — | |
| 300 | +| `ZSTD_compressSequencesAndLiterals` | — | |
| 301 | +| `ZSTD_generateSequences` | — | |
| 302 | +| `ZSTD_mergeBlockDelimiters` | — | |
| 303 | +| `ZSTD_registerSequenceProducer` | — | |
| 304 | + |
| 305 | +### Misc / experimental (0/11) |
| 306 | + |
| 307 | +| Symbol | Bound | |
| 308 | +|---|:---:| |
| 309 | +| `ZSTD_adjustCParams` | — | |
| 310 | +| `ZSTD_checkCParams` | — | |
| 311 | +| `ZSTD_copyCCtx` | — | |
| 312 | +| `ZSTD_copyDCtx` | — | |
| 313 | +| `ZSTD_getCParams` | — | |
| 314 | +| `ZSTD_getParams` | — | |
| 315 | +| `ZSTD_initStaticCCtx` | — | |
| 316 | +| `ZSTD_initStaticCDict` | — | |
| 317 | +| `ZSTD_initStaticDCtx` | — | |
| 318 | +| `ZSTD_initStaticDDict` | — | |
| 319 | +| `ZSTD_isDeterministicBuild` | — | |
0 commit comments