node/lib/metasm/metasm/exe_format/zip.rb
# reads the raw file data from the archive
reads the raw file data from the archive
reads the raw file data from the archive
def file_data(zip)
			return @data if data
			zip.encoded.ptr = @localhdr_off
			LocalHeader.decode(zip)
			raw = zip.encoded.read(@compressed_sz)
			@data = case @compress_method
			when 'NONE'
				raw
			when 'DEFLATE'
				z = Zlib::Inflate.new(-Zlib::MAX_WBITS)
				z.inflate(raw)
			else
				raise "Unsupported zip compress method #@compress_method"
			end
		end
def file_data ( zip ) return @data if data zip . encoded . ptr = @localhdr_off LocalHeader . decode ( zip ) raw = zip . encoded . read ( @compressed_sz ) @data = case @compress_method when 'NONE' raw when 'DEFLATE' z = Zlib :: Inflate . new ( - Zlib :: MAX_WBITS ) z . inflate ( raw ) else raise "Unsupported zip compress method #@compress_method" end end
reads the raw file data from the archive
reads the raw file data from the archive
zip