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§
- Archive
Extra Data Record - Archive Extra Data Record
- Archive
Extra Data Record Fixed - part of
ArchiveExtraDataRecord
which has a fixed size - Central
Directory Header - Central Directory Header
- Central
Directory Header Fixed - part of
CentralDirectoryHeader
which has a fixed size - Data
Descriptor - Data descriptor
- Data
Descriptor Signature - Data descriptor with a signature see
DataDescriptor
- Data
Descriptor Zip64 - Data descriptor for Zip64, sizes are 8 bytes instead of 4, see
DataDescriptor
- Data
Descriptor Zip64 Signature - Data descriptor for Zip64, sizes are 8 bytes instead of 4 and with a
signature, see
DataDescriptor
- Digital
Signature - part of
LocalFileHeader
which has a fixed size - Digital
Signature Fixed - part of
DigitalSignature
which has a fixed size - EndOf
Central Directory - End of central directory record
- EndOf
Central Directory Fixed - part of
EndOfCentralDirectory
which has a fixed size - Extensible
Data - Extensible data fields
- Extensible
Data Fixed - part of
ExtensibleData
which has a fixed size - Local
File Header - Local File Header
- Local
File Header Fixed - part of
LocalFileHeader
which has a fixed size - Zip64
EndOf Central Directory - part of
Zip64EndOfCentralDirectory
which has a fixed size - Zip64
EndOf Central Directory Fixed - Zip64 end of central directory record
- Zip64
EndOf Central Directory Locator - Zip64 end of central directory locator