Module parse

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

Archive
An Archive contains general information about a zip files, along with a list of entries.
CentralDirectoryFileHeader
4.3.12 Central directory structure: File header
DataDescriptorRecord
4.3.9 Data descriptor:
EndOfCentralDirectory
Coalesces zip and zip64 “end of central directory” record info
EndOfCentralDirectory64Locator
4.3.15 Zip64 end of central directory locator
EndOfCentralDirectory64Record
4.3.14 Zip64 end of central directory record
EndOfCentralDirectoryRecord
4.3.16 End of central directory record:
Entry
Describes a zip archive entry (a file, a directory, a symlink)
ExtraFieldSettings
Useful because zip64 extended information extra field has fixed order but optional fields. From the appnote:
ExtraNewUnixField
Info-ZIP New Unix Extra Field:
ExtraNtfsField
4.5.5 -NTFS Extra Field (0x000a):
ExtraTimestampField
Extended timestamp extra field
ExtraUnixField
4.5.7 -UNIX Extra Field (0x000d):
ExtraZip64Field
4.5.3 -Zip64 Extended Information Extra Field (0x0001)
LocalFileHeader
4.3.7 Local file header
Located
A zip structure and its location in the input file
LzmaProperties
5.8.5 LZMA Properties header
Mode
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
MsdosMode represents the file mode and permission bits for MS-DOS
MsdosTimestamp
A timestamp in MS-DOS format
NtfsAttr1
NTFS attribute 1, which contains modified/accessed/created timestamps
NtfsTimestamp
A timestamp in NTFS format.
UnixMode
UnixMode represents the file mode and permission bits for Unix systems.
Version
A zip version (either created by, or required when reading an archive).

Enums§

EntryKind
The entry’s file type: a directory, a file, or a symbolic link.
ExtraField
Information stored in the central directory header extra field
HostSystem
System on which an archive was created, as encoded into a version u16.
Method
Compression method used for a file entry.
MethodSpecific
Method-specific properties following the local file header
NtfsAttr
NTFS attribute for zip entries (mostly timestamps)