Expand description
Parsers and types for the various elements that make up a ZIP file.
Contain winnow parsers for most elements that make up a ZIP file, like the end-of-central-directory record, local file headers, and central directory headers.
All parsers here are based off of the PKWARE appnote.txt, which you can find in the source repository.
Structs§
- An Archive contains general information about a zip files, along with a list of entries.
- 4.3.12 Central directory structure: File header
- 4.3.9 Data descriptor:
- Coalesces zip and zip64 “end of central directory” record info
- 4.3.15 Zip64 end of central directory locator
- 4.3.14 Zip64 end of central directory record
- 4.3.16 End of central directory record:
- Describes a zip archive entry (a file, a directory, a symlink)
- Useful because zip64 extended information extra field has fixed order but optional fields. From the appnote:
- Info-ZIP New Unix Extra Field:
- 4.5.5 -NTFS Extra Field (0x000a):
- Extended timestamp extra field
- 4.5.7 -UNIX Extra Field (0x000d):
- 4.5.3 -Zip64 Extended Information Extra Field (0x0001)
- 4.3.7 Local file header
- A zip structure and its location in the input file
- 5.8.5 LZMA Properties header
- Mode represents a file’s mode and permission bits. The bits have the same definition on all systems, but not all bits apply to all systems.
- MsdosMode represents the file mode and permission bits for MS-DOS
- A timestamp in MS-DOS format
- NTFS attribute 1, which contains modified/accessed/created timestamps
- A timestamp in NTFS format.
- UnixMode represents the file mode and permission bits for Unix systems.
- A zip version (either created by, or required when reading an archive).
Enums§
- The entry’s file type: a directory, a file, or a symbolic link.
- Information stored in the central directory header
extra
field - System on which an archive was created, as encoded into a version u16.
- Compression method used for a file entry.
- Method-specific properties following the local file header
- NTFS attribute for zip entries (mostly timestamps)