Method: Zip::PassThruDecompressor#read
- Defined in:
- lib/zip/pass_thru_decompressor.rb
#read(length = nil, outbuf = +'')) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/zip/pass_thru_decompressor.rb', line 10 def read(length = nil, outbuf = +'') return (length.nil? || length.zero? ? '' : nil) if eof? if length.nil? || (@read_so_far + length) > decompressed_size length = decompressed_size - @read_so_far end @read_so_far += length input_stream.read(length, outbuf) end |