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
The pure-V x/compress/brotli module only exposes compress/decompress, while the native compress.brotli module also exposes decompress_with_callback (used by net/http response decoding for memory-bounded streaming with early-stop).
Switching the import to the pure-V module (e.g. for static builds without system libbrotli) therefore breaks any caller that streams, with unknown function: brotli.decompress_with_callback.
#30904 (the pure-V module) compares only compress/decompress size/speed and never mentions the callback, so this looks like an oversight rather than an intentional carve-out. I searched issues and PRs for decompress_with_callback / x/compress/brotli parity and found nothing covering it (#24904 added the gzip callback before any brotli module existed).
Proposal: add DecompressCallback (same fn ([]u8, voidptr) int shape as the native one, so existing callbacks keep working) and decompress_with_callback(data, cb, userdata) decoding with default DecompressParams and delivering 32 KiB chunks like the native decoder, returning delivered bytes on early stop. I have a PR ready.
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
Context/motivation: vox-browser/vox's Linux production build (unpinned V HEAD, FastC backend) fails with unknown function: brotli.decompress_with_callback when its HTTP compat layer swaps compress.brotli for the pure-V x/compress/brotli (see vox-browser/vox#68, which carries a local same-module shim as a workaround). An upstream decompress_with_callback with the native contract would let that shim go away. PR #32307 implements exactly the contract proposed above.
Activity
metif12 commentedon Nov 13, 2026
Context/motivation: vox-browser/vox's Linux production build (unpinned V HEAD, FastC backend) fails with
unknown function: brotli.decompress_with_callbackwhen its HTTP compat layer swapscompress.brotlifor the pure-Vx/compress/brotli(see vox-browser/vox#68, which carries a local same-module shim as a workaround). An upstreamdecompress_with_callbackwith the native contract would let that shim go away. PR #32307 implements exactly the contract proposed above.