Looking at RubyDoc for GzipReader (
http://ruby-doc.org/core/classes/Zlib/GzipReader.html) I notice that
there
is no seek() method available, as with IO.seek() or IO.pos=.
Does anyone have any ideas on how to do a traditional seek through a
gzip’ed
file using GzipReader?
I notice that there is GzipReader.lineno=(), but, as per this discussion
from about 2 years ago (IO.lineno= not behaving as expected - Ruby - Ruby-Forum), the
purpose
of lineno=() eludes me (since it doesn’t actually modify the position
for
the next read operation).
I should clarify that the files being read are quite large (as in
several
gigabytes), and so loading up the entire file into an Array in memory is
not
an option for me.
regards,
Matt