Title: vortex.zstd: dictionary-compressed segments not decodable (pure-Java backend lacks dict support) · Issue #104 · dfa1/vortex-java · GitHub
Open Graph Title: vortex.zstd: dictionary-compressed segments not decodable (pure-Java backend lacks dict support) · Issue #104 · dfa1/vortex-java
X Title: vortex.zstd: dictionary-compressed segments not decodable (pure-Java backend lacks dict support) · Issue #104 · dfa1/vortex-java
Description: Summary vortex.zstd segments compressed with a trained dictionary cannot be decoded. ZstdEncodingDecoder fails fast when dictionary_size != 0: io.github.dfa1.vortex.core.VortexException: vortex.zstd: dictionary-compressed Zstd segments a...
Open Graph Description: Summary vortex.zstd segments compressed with a trained dictionary cannot be decoded. ZstdEncodingDecoder fails fast when dictionary_size != 0: io.github.dfa1.vortex.core.VortexException: vortex.zst...
X Description: Summary vortex.zstd segments compressed with a trained dictionary cannot be decoded. ZstdEncodingDecoder fails fast when dictionary_size != 0: io.github.dfa1.vortex.core.VortexException: vortex.zst...
Opengraph URL: https://github.com/dfa1/vortex-java/issues/104
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"vortex.zstd: dictionary-compressed segments not decodable (pure-Java backend lacks dict support)","articleBody":"## Summary\n\n`vortex.zstd` segments compressed **with a trained dictionary** cannot be decoded. `ZstdEncodingDecoder` fails fast when `dictionary_size != 0`:\n\n```\nio.github.dfa1.vortex.core.VortexException:\n vortex.zstd: dictionary-compressed Zstd segments are not supported (pure-Java decoder)\n```\n\nThis is hit by the upstream compatibility fixture `zstd.vortex` (v0.75.0).\n\n## Why\n\nThe decode backend (`io.airlift:aircompressor-v3`) has **no Zstd dictionary support**:\n- `ZstdFrameDecompressor` exposes no API to preload a dictionary's entropy tables or seed the back-reference window; `reset()` only clears state.\n- Rust uses `zstd::bulk::Decompressor::with_dictionary(dict)` (native libzstd).\n\nThe published `zstd.vortex` fixture genuinely requires it:\n- dict buffer begins with `0xEC30A437` → **trained** dictionary (preset Huffman + 3 FSE tables + content), Dictionary_ID `0x22a28c3d`.\n- frames carry the Dictionary_ID flag referencing that same ID — preset entropy tables **and** window seeding are mandatory.\n\nBuffer layout (per Rust `encodings/zstd/src/array.rs`): `buffer[0]` = dictionary, `buffer[1..]` = frames.\n\n## Options considered\n\n1. **Pure-Java dict decoder from scratch** on `MemorySegment` (~1500–2500 LOC: dict parse, Huffman incl. Treeless, 3 FSE tables incl. Repeat mode, sequence execution with window-prefix matches). Verifiable against one fixture only — high correctness risk.\n2. **Vendor/extend aircompressor's frame decompressor** — rejected: its core uses `sun.misc.Unsafe` (~67 refs), violating the project's no-Unsafe / FFM-only rule.\n3. **zstd-jni (native)** — rejected: violates the no-JNI rule.\n\n## Current state\n\nFail-fast guard retained; covered by `VortexHttpReaderIT#scan_zstdVortex_rejectsDictionaryCompression`, which asserts the clear error. `zstd.vortex` is excluded from the encoding smoke test. Re-enable once a pure-Java dictionary path exists (or aircompressor ships dict support).\n\n## References\n\n- Rust decode: `encodings/zstd/src/array.rs` (`decompress`, line ~888: `Decompressor::with_dictionary`)\n- Buffer layout: same file, `deserialize` line ~204","author":{"url":"https://github.com/dfa1","@type":"Person","name":"dfa1"},"datePublished":"2026-06-20T19:26:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/104/vortex-java/issues/104"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:36747a72-88ba-d179-b7ed-7032d690dea5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E21C:13B1D:21B6264:2FA35BF:6A4CD9EC |
| html-safe-nonce | db1fb3ccb82a72b5a53119ebeb8a1778072b52fb02730ae527ff5b632f59b3bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjFDOjEzQjFEOjIxQjYyNjQ6MkZBMzVCRjo2QTRDRDlFQyIsInZpc2l0b3JfaWQiOiI1Mjg4NTAzMjE0NTc1NzcwMDkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 23b4916ce2b89b012a09c14c1e9289668114b0f7ad25bbdce5bb98414940fa23 |
| hovercard-subject-tag | issue:4708107266 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dfa1/vortex-java/104/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cff8ff2589c43f3833e5c0232c9d91583fa64d3739375b416683c985b50a6479/dfa1/vortex-java/issues/104 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cff8ff2589c43f3833e5c0232c9d91583fa64d3739375b416683c985b50a6479/dfa1/vortex-java/issues/104 |
| og:image:alt | Summary vortex.zstd segments compressed with a trained dictionary cannot be decoded. ZstdEncodingDecoder fails fast when dictionary_size != 0: io.github.dfa1.vortex.core.VortexException: vortex.zst... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dfa1 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/dfa1/vortex-java git https://github.com/dfa1/vortex-java.git |
| octolytics-dimension-user_id | 5798698 |
| octolytics-dimension-user_login | dfa1 |
| octolytics-dimension-repository_id | 1249412947 |
| octolytics-dimension-repository_nwo | dfa1/vortex-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1249412947 |
| octolytics-dimension-repository_network_root_nwo | dfa1/vortex-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3eeb74f55ccd8a31bdaec6839577c592bbf7844c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width