Project

General

Profile

Bug #9790

Zlib::GzipReader only decompressed the first of concatenated files

Added by quainjn (Jake Quain) about 6 years ago. Updated about 1 month ago.

Status:
Feedback
Priority:
Normal
Target version:
-
ruby -v:
2.1.1
[ruby-core:62257]
Tags:

Description

There is a similar old issue in Node that I came across that perfectly describes the situation in ruby:

https://github.com/joyent/node/issues/6032

In ruby given the following setup:

echo "1" > 1.txt
echo "2" > 2.txt
gzip 1.txt
gzip 2.txt
cat 1.txt.gz 2.txt.gz > 3.txt.gz

Calling:

Zlib::GzipReader.open("3.txt.gz") do |gz|
  print gz.read
end

would just print:

1

Files

zlib-gzreader-each_file-9790.patch (3.47 KB) zlib-gzreader-each_file-9790.patch jeremyevans0 (Jeremy Evans), 11/27/2019 03:35 PM

Related issues

Related to Ruby master - Bug #14804: GzipReader cannot read Freebase dump (but gzcat/zless can)OpenActions
Has duplicate Ruby master - Bug #11180: Missing lines with Zlib::GzipReaderOpenActions

Also available in: Atom PDF