Module zip_core::raw

source ·
Expand description

zip-core::raw contains 1:1 memory format of zip headers for use in your projects e.g. if you want to build your own zip crate.

Note: for concenience, all structs with variable size are split into a fixed part and the variable part. The fixed part is prepended with Fixed. This should make parsing easier

§Rage List of things about https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

  • all fields unless noted are unsigned and little endian (there are no notions), however we should set one to -1 in 4.4.1.4, how?!?!
  • optional signature that are not standart but are recomended.
  • noone explains what zip64 does, what it tries to do, etc.
  • measurements, sometimes its offset, sometimes total size, sometimes remaining size, and sometimes, size from this byte onwards
§Naming Rage

During reading the document I almost had a seizure regarding to naming. Nevertheless I decided against renaming fields, as this is what the author PKWARE decided on, and probably the whole industry has adopted to and i dont want to create xkcd:927 However, if in future revisions some names are adopted I would be more than happy. Here are some of the incompatibilities

  • of all fields and structures, sometimes sturct, sometimes record, often nothing
  • sometimes central dir, sometimes central directory
  • Zip64 end of central directory locator vs Zip64 end of central directory locator record
  • the central directory is sometimes a single central directory header and sometimes a central directory structure
  • sometimes its a length sometimes a size

Modules§

  • Parsing functionality from bytes for raw types. Note: this is only enabled with the parse feature

Structs§