Implements dictionary support for ZSTD compression and decompression in node:zlib,
matching Node.js API. Dictionaries can significantly improve compression ratios
for data with predictable patterns.
Changes:
- Add compressUsingDict and decompressUsingDict functions to src/deps/zstd.zig
- Update NativeZstd.zig to handle dictionary loading in compression contexts
- Modify Zstd class in zlib.ts to accept dictionary option and pass to native code
- Add test case from Node.js test suite to verify functionality
The implementation uses ZSTD_CCtx_loadDictionary and ZSTD_DCtx_loadDictionary
APIs for streaming compression/decompression with dictionary support.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>