Module 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§

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

Structs§

ArchiveExtraDataRecord
Archive Extra Data Record
ArchiveExtraDataRecordFixed
part of ArchiveExtraDataRecord which has a fixed size
CentralDirectoryHeader
Central Directory Header
CentralDirectoryHeaderFixed
part of CentralDirectoryHeader which has a fixed size
DataDescriptor
Data descriptor
DataDescriptorSignature
Data descriptor with a signature see DataDescriptor
DataDescriptorZip64
Data descriptor for Zip64, sizes are 8 bytes instead of 4, see DataDescriptor
DataDescriptorZip64Signature
Data descriptor for Zip64, sizes are 8 bytes instead of 4 and with a signature, see DataDescriptor
DigitalSignature
part of LocalFileHeader which has a fixed size
DigitalSignatureFixed
part of DigitalSignature which has a fixed size
EndOfCentralDirectory
End of central directory record
EndOfCentralDirectoryFixed
part of EndOfCentralDirectory which has a fixed size
ExtensibleData
Extensible data fields
ExtensibleDataFixed
part of ExtensibleData which has a fixed size
LocalFileHeader
Local File Header
LocalFileHeaderFixed
part of LocalFileHeader which has a fixed size
Zip64EndOfCentralDirectory
part of Zip64EndOfCentralDirectory which has a fixed size
Zip64EndOfCentralDirectoryFixed
Zip64 end of central directory record
Zip64EndOfCentralDirectoryLocator
Zip64 end of central directory locator