Method: Zip::InputStream#initialize
- Defined in:
- lib/zip/input_stream.rb
#initialize(filename, offset = 0, io = nil) ⇒ 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.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/zip/input_stream.rb', line 49 def initialize(filename, offset = 0, io = nil) super() if (io.nil?) @archiveIO = ::File.open(filename, "rb") @archiveIO.seek(offset, IO::SEEK_SET) else @archiveIO = io end @decompressor = NullDecompressor.instance @currentEntry = nil end |