zig/lib/std/compress
Ian Johnson 80f3ef6e14 Package.Fetch: fix Git package fetching
This commit works around #18967 by adding an `AccumulatingReader`, which
accumulates data read from the underlying packfile, and by keeping track
of the position in the packfile and hash/checksum information separately
rather than using reader composition. That is, the packfile position and
hashes/checksums are updated with the accumulated read history data only
after we can determine what data has actually been used by the
decompressor rather than merely being buffered.

The only addition to the standard library APIs to support this change is
the `unreadBytes` function in `std.compress.flate.Inflate`, which allows
the user to determine how many bytes have been read only for buffering
and not used as part of compressed data.

These changes can be reverted if #18967 is resolved with a decompressor
that reads precisely only the number of bytes needed for decompression.
2024-02-19 13:43:32 -08:00
..
flate Package.Fetch: fix Git package fetching 2024-02-19 13:43:32 -08:00
lzma std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
lzma2 std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
testdata remove v1 deflate implementation 2024-02-14 22:34:13 +01:00
xz std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
zstandard lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
flate.zig skip failing wasm tests 2024-02-15 00:35:08 +01:00
gzip.zig reorganize compress package root folder 2024-02-14 23:34:13 +01:00
lzma.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
lzma2.zig Delete redundant lzma/lzma2 prefix in function/struct names 2023-02-05 06:52:28 -08:00
xz.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
zlib.zig reorganize compress package root folder 2024-02-14 23:34:13 +01:00
zstandard.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00