Method: Zip::InputStream#initialize

Defined in:
lib/zip/input_stream.rb

#initialize(context, offset = 0) ⇒ InputStream

Opens the indicated zip file. An exception is thrown if the specified offset in the specified filename is not a local zip entry header.

Parameters:

  • context (String||IO||StringIO)

    file path or IO/StringIO object

  • offset (Integer) (defaults to: 0)

    offset in the IO/StringIO



50
51
52
53
54
55
# File 'lib/zip/input_stream.rb', line 50

def initialize(context, offset = 0)
  super()
  @archive_io = get_io(context, offset)
  @decompressor  = ::Zip::NullDecompressor
  @current_entry = nil
end