Project

General

Profile

Actions

Bug #9790

closed

Zlib::GzipReader only decompressed the first of concatenated files

Added by quainjn (Jake Quain) over 10 years ago. Updated over 4 years ago.

Status:
Closed
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 2 (0 open2 closed)

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0