Packmatic.Field.Local.DataDescriptor (Packmatic v2.1.0)

Copy Markdown View Source

Represents the Data Descriptor, which is used to facilitate streaming. This is requried since Packmatic assembles the files on the fly, so it does not know the size until the entire source has been read.

Structure

Data Descriptor

SizeContent
4 bytesSignature
4 bytesChecksum (CRC-32)
4/8 bytesCompressed Size (Bytes)
4/8 bytesOriginal Size (Bytes)

Notes

  1. APPNOTE section 4.3.9 recommends 8-byte sizes when an entry exceeds the Zip32 limit and permits them regardless of size. Packmatic uses 8-byte sizes only when required, retaining compatibility with single-pass streaming decoders that select the descriptor width from the number of bytes processed.

Summary

Types

t()

@type t() :: %Packmatic.Field.Local.DataDescriptor{
  checksum: non_neg_integer(),
  size: non_neg_integer(),
  size_compressed: non_neg_integer()
}