class ZipTricks::Writer
- ZipTricks::Writer
- Reference
- Object
Defined in:
writer.crConstant Summary
-
CRZT_COMMENT =
"Written using cr_zip_tricks v.#{ZipTricks::VERSION}"
-
EIGHT_BYTE_MAX_UINT =
UInt64::MAX
-
FOUR_BYTE_MAX_UINT =
UInt32::MAX
-
MADE_BY_SIGNATURE =
Bytes[52, 3]
-
A combination of the VERSION_MADE_BY low byte and the OS type high byte VERSION_MADE_BY = 52 os_type = 3 # UNIX [VERSION_MADE_BY, os_type].pack('CC')
-
TWO_BYTE_MAX_UINT =
UInt16::MAX
-
VERSION_NEEDED_TO_EXTRACT =
20
-
VERSION_NEEDED_TO_EXTRACT_ZIP64 =
45
Instance Method Summary
- #dir_external_attrs
- #file_external_attrs
- #write_central_directory_file_header(io : IO, filename : String, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize, crc32 : ZipCRC32, gp_flags : ZipGpFlags, mtime : Time, storage_mode : ZipStorageMode, local_file_header_location : ZipLocation)
- #write_data_descriptor(io : IO, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize, crc32 : ZipCRC32)
- #write_end_of_central_directory(io : IO, start_of_central_directory_location : ZipLocation, central_directory_size : ZipLocation, num_files_in_archive : ZipLocation, comment : String = CRZT_COMMENT)
- #write_int32_le(io : IO, val : Int)
- #write_local_file_header(io : IO, filename : String, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize, crc32 : ZipCRC32, gp_flags : ZipGpFlags, mtime : Time, storage_mode : ZipStorageMode)
-
#write_timestamp_extra_field(io : IO, mtime : Time)
Writes the extended timestamp information field.
- #write_uint16_le(io : IO, val : Int)
- #write_uint32_le(io : IO, val : Int)
- #write_uint64_le(io : IO, val : Int)
- #write_uint8_le(io : IO, val : Int)
- #write_zip64_extra_for_central_directory_file_header(io : IO, uncompressed_size : Int, compressed_size : Int, local_file_header_location : ZipLocation)
- #write_zip64_extra_for_local_file_header(io : IO, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize)
Instance Method Detail
def write_central_directory_file_header(io : IO, filename : String, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize, crc32 : ZipCRC32, gp_flags : ZipGpFlags, mtime : Time, storage_mode : ZipStorageMode, local_file_header_location : ZipLocation)
#
def write_data_descriptor(io : IO, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize, crc32 : ZipCRC32)
#
def write_end_of_central_directory(io : IO, start_of_central_directory_location : ZipLocation, central_directory_size : ZipLocation, num_files_in_archive : ZipLocation, comment : String = CRZT_COMMENT)
#
def write_local_file_header(io : IO, filename : String, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize, crc32 : ZipCRC32, gp_flags : ZipGpFlags, mtime : Time, storage_mode : ZipStorageMode)
#
def write_timestamp_extra_field(io : IO, mtime : Time)
#
Writes the extended timestamp information field. The spec defines 2 different formats - the one for the local file header can also accomodate the atime and ctime, whereas the one for the central directory can only take the mtime - and refers the reader to the local header extra to obtain the remaining times
def write_zip64_extra_for_central_directory_file_header(io : IO, uncompressed_size : Int, compressed_size : Int, local_file_header_location : ZipLocation)
#
def write_zip64_extra_for_local_file_header(io : IO, compressed_size : ZipFilesize, uncompressed_size : ZipFilesize)
#