aboutsummaryrefslogtreecommitdiff
path: root/src/Package/Module.zig
diff options
context:
space:
mode:
authorIan Johnson <ian@ianjohnson.dev>2024-02-18 16:39:03 -0500
committerAndrew Kelley <andrew@ziglang.org>2024-02-19 13:43:32 -0800
commit80f3ef6e14a1213d1c3b31d515870afb43cc9379 (patch)
treebaeb9d69b66b63cc8d08588e9ab94b12ebc68534 /src/Package/Module.zig
parent5c25ad0fda23eca4b98aad48d709b3b1b9caf2d6 (diff)
downloadzig-80f3ef6e14a1213d1c3b31d515870afb43cc9379.tar.gz
zig-80f3ef6e14a1213d1c3b31d515870afb43cc9379.zip
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.
Diffstat (limited to 'src/Package/Module.zig')
0 files changed, 0 insertions, 0 deletions