Closed
Description
Zig package manager hashes currently use multihash to encode metadata into the hash bytes. For example, which hash algorithm is used. Additionally, we can encode more information, such as the uncompressed total file size of the package, without breaking prior hashes, thanks to this encoding.
This would allow for better progress reporting when running zig build
and packages are being fetched, even when the server responds with content-encoding: chunked. This would require some fun bookkeeping, such as streaming the http response through the decompressor through tarball unpacking, through the filtering process (#14311), and then counting how many bytes are actually written to disk.
It would work, though!