Comment Comment by Jarred Here is the code:https://github.com/oven-sh/bun/blob/7d5f5ad7728b4ede521906a4...We trust the self-reported size by gzip up to 64 MB, try to allocate enough space for all the output, then run it through libdeflate.This is instead of a loop that decompresses it chunk-by-chunk and then extracts it chunk-by-chunk and resizing a big tarball many times over. parent Jarred 1 year ago
https://github.com/oven-sh/bun/blob/7d5f5ad7728b4ede521906a4...
We trust the self-reported size by gzip up to 64 MB, try to allocate enough space for all the output, then run it through libdeflate.
This is instead of a loop that decompresses it chunk-by-chunk and then extracts it chunk-by-chunk and resizing a big tarball many times over.