summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2026-02-19 01:33:25 +0100
committerTom Rini <[email protected]>2026-04-22 13:51:41 -0600
commit58e523fedf48a304b54c4e42e46fd88d072f8751 (patch)
tree2120e4b23382e09010151f146babb2133a7c04f2 /include/linux/kernel.h
parent70101c3217aec849d509040554ef0cf7c0f1ef56 (diff)
gunzip: Implement chunked decompression
The current gzwrite() implementation is limited to 4 GiB compressed input buffer size due to struct z_stream_s { uInt avail_in } member, which is of type unsigned int. Current gzwrite() implementation sets the entire input buffer size as avail_in and performs decompression of the whole compressed input buffer in one round, which limits the size of input buffer to 4 GiB. Rework the decompression loop to use chunked approach, and decompress the input buffer in up to 4 GiB - 1 kiB avail_in chunks, possibly in multiple decompression rounds. This way, the compressed input buffer size is limited by gzwrite() function 'len' parameter type, which is unsigned long. In case of sandbox build, include parsing of 'gzwrite_chunk' environment variable, so the chunked approach can be thoroughly tested with non default chunk size. For non-sandbox builds, the chunk size is 4 GiB - 1 kiB. The gzwrite test case is extended to test various chunk sizes during gzwrite decompression test. Signed-off-by: Marek Vasut <[email protected]>
Diffstat (limited to 'include/linux/kernel.h')
0 files changed, 0 insertions, 0 deletions