-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
There are a few things that were explicitly not done in the initial Zstandard decompression PR that may be desired improvements. This issue is to collect them (and others that pop up in between) for future reference in a pre-1.0 stdlib review or to list them incase someone to tackle them earlier.
- The current implementation does not decode 4-stream literal sections in parallel in order to avoid memory allocations (or remove a need for an additional 128KiB of memory) in the non-allocating API. This presumably sacrifices decompression performance, but benchmarking may be needed to assess what the impact is in practice. This change would require re-working the block decoding in
lib/std/compress/zstandard/decode/block.zigto eagerly decode literals into an extra internal buffer. - Reuse allocations between frames in
std.compress.zstd.decompress.decodeAlloc()API). The frame window could be re-used between frames (provided it is large enough). The relevant allocation is here. - a few issue we found may result in minor updates to the zstandard spec - issues found while fuzzing to compare behaviour of Zig decoder to this repo facebook/zstd#3508 is the main upstream issue that will hopefully link to any related changes that get made.
- Check implementation against documentation changes in Clarify zstd specification for Huffman blocks facebook/zstd#3514
squeek502, matu3ba and lin72h
Metadata
Metadata
Assignees
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.