class Ronin::Support::Archive::Zip::Reader::Entry
Represents an entry in a zip archive.
@since 1.0.0
Attributes
The compression ratio of the file.
@return [Integer]
The CRC32 checksum (in hex encoding).
@return [String]
The date of the file.
@return [Date]
The length of the file.
@return [Integer]
The compression method used.
@return [:stored, :deflate]
The name of the file.
@return [String]
The size of the file.
@return [Integer]
The time of the file.
@return [Time]
Public Class Methods
Source
# File lib/ronin/support/archive/zip/reader/entry.rb, line 97 def initialize(reader, length: , method: , size: , compression: , date: , time: , crc32: , name: ) @reader = reader @length = length @method = method @size = size @compression = compression @date = date @time = time @crc32 = crc32 @name = name end
Initializes the zip archive entry.
@param [Reader] reader
@param [Integer] length
@param [:stored, :deflate] method
@param [Integer] size
@param [Integer] compression
@param [Date] date
@param [Time] time
@param [String] crc32
@param [String] name
@api private
Public Instance Methods
Source
# File lib/ronin/support/archive/zip/reader/entry.rb, line 125 def read(length=nil) @reader.read(@name, length: length) end
Reads the contents of the entry.
@param [Integer, nil] length
Optional number of bytes to read.
@return [String]
The read data.