You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: load/ref dictionaries on contexts (loadDictionary / refDictionary)
Bind ZSTD_CCtx/DCtx_loadDictionary on the one-shot contexts (previously
only on streams) and the new ZSTD_CCtx_refCDict / ZSTD_DCtx_refDDict.
A sticky dictionary on a context lets compression combine a dictionary
with the advanced parameters (checksum, window log, long-distance
matching) via the compress2 path — impossible through the per-call
compress(src, dict) overloads, which route the legacy dictionary path.
refDictionary attaches a pre-digested CDict/DDict by reference (no copy,
no per-call digest), the pooled-context hot path that pairs with reset.
A parameter reset clears either.
loadDictionary takes a ZstdDictionary or a native MemorySegment
(zero-copy); refDictionary borrows the digest, so the caller keeps it
alive. Tests cover dict+checksum combine, ref-across-session-reset,
reset/null clearing, segment load, and zstd-jni interop on both frames.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments