Packmatic.Field.Shared.ExtendedInformation (Packmatic v2.0.0)

View Source

Represents the Zip64 Extended Information Extra Field, which can be emitted in both Local and Central File Headers, but in practice only used in the Central File Header within Packmatic, due to its streaming nature.

This field always emits Zip64 representations of the 3 relevant fields (Original Size, Compressed Size, or Offset), whether they could or could not fit within 4 bytes; their respective Zip32 representations were always filled with 0xFF. This is based on the relevant section of the APPNOTE:

4.3.9.2 When compressing files, compressed and uncompressed sizes SHOULD be stored in ZIP64 format (as 8 byte values) when a file's size exceeds 0xFFFFFFFF. However ZIP64 format MAY be used regardless of the size of a file. When extracting, if the zip64 extended information extra field is present for the file the compressed and uncompressed sizes will be 8 byte values.

Therefore we will always emit the Zip64 representation.

Structure

Shared Zip64 Extended Information

SizeContent
2 bytesSignature
2 bytesSize of Rest of Field (Bytes)
8 bytesOriginal Size (Bytes)
8 bytesCompressed Size (Bytes)
8 bytesOffset of Local File Header (Bytes)

Summary

Types

t()

@type t() :: %Packmatic.Field.Shared.ExtendedInformation{
  offset: non_neg_integer(),
  size: non_neg_integer(),
  size_compressed: non_neg_integer()
}