class FormatParser::ZIPParser::FileReader::ZipEntry
Represents a file within the ZIP archive being read
Attributes
@return [String] the file comment
@return [Fixnum] size of compressed file data in the ZIP
@return [Fixnum] the CRC32 checksum of this file
@return [Fixnum] disk number where this file starts
@return [Fixnum] the bit-packed DOS date
@return [Fixnum] the bit-packed DOS time
@return [Fixnum] external attributes of the file
@return [String] the filename
@return [Fixnum] bit-packed general purpose flags
@return [Fixnum] internal attributes of the file
@return [Fixnum] at what offset the local file header starts
in your original IO object
@return [Fixnum] bit-packed version signature of the program that made the archive
@return [Fixnum] Storage mode (0 for stored, 8 for deflate)
@return [Fixnum] size of the file once uncompressed
@return [Fixnum] ZIP version support needed to extract this file
Public Instance Methods
@return [Fixnum] at what offset you should start reading
for the compressed data in your original IO object
# File lib/parsers/zip_parser/file_reader.rb, line 129 def compressed_data_offset @compressed_data_offset || raise(LocalHeaderPending) end
Sets the offset at which the compressed data for this file starts in the ZIP. By default, the value will be set by the Reader for you. If you use delayed reading, you need to set it by using the `get_compressed_data_offset` on the Reader:
entry.compressed_data_offset = reader.get_compressed_data_offset(io: file, local_file_header_offset: entry.local_header_offset)
# File lib/parsers/zip_parser/file_reader.rb, line 151 def compressed_data_offset=(offset) @compressed_data_offset = offset.to_i end
Tells whether the compressed data offset is already known for this entry @return [Boolean]
# File lib/parsers/zip_parser/file_reader.rb, line 135 def known_offset? !@compressed_data_offset.nil? end
Tells whether the entry uses a data descriptor (this is defined by bit 3 in the GP flags).
# File lib/parsers/zip_parser/file_reader.rb, line 141 def uses_data_descriptor? (gp_flags & 0x0008) == 0x0008 end