Skip to content

Commit e6e117f

Browse files
committed
Add support for concatenated gzip streams
The gzip file format allows multiple compressed "members" in a single file, simply concatenated together. The decompressed file is considered to be the concetenation of the corresponding decompressed members. Previously we just decompressed the first member (though we did at least report the trailing data). Now by default we decompress all the members. This behaviour can be controlled by the decompressAllMembers field in the DecompressParams. The test we use is that if the next two bytes are the two-byte gzip header magic number then we expect another gzip member. If not then we end the stream and report the trailing data. The implementation of this is a bit tricky because of all the boundary conditions.
1 parent 78c0432 commit e6e117f

File tree

2 files changed

+290
-141
lines changed

2 files changed

+290
-141
lines changed

0 commit comments

Comments
 (0)