Skip to main content

Module central_directory

Module central_directory 

Source

StructsΒ§

Entry
One entry as the central directory describes it, which is the authority: a streaming archiver leaves the local header’s sizes zero.

ConstantsΒ§

DIRECTORY_ENTRY_LENGTH πŸ”’
END_OF_DIRECTORY_LENGTH πŸ”’
SIGNATURE_DIRECTORY_ENTRY πŸ”’
SIGNATURE_END_OF_DIRECTORY πŸ”’
SIGNATURE_LOCAL_HEADER
ZIP64_COUNT πŸ”’
Zip64 saturates the 16-bit count field.
ZIP64_FIELD πŸ”’
Zip64 saturates the 32-bit size and offset fields.

FunctionsΒ§

find_end_of_directory πŸ”’
Scans back over the longest comment a 16-bit length allows, since the end-of-directory record is the only fixed point in a zip.
keep_last_of_each_path πŸ”’
A zip may list one path twice, or in two cases that NTFS treats as one; extraction leaves the last on disk, so the listing keeps the last too.
read
Every entry, refusing the whole archive when any name would leave the target.
read_entry πŸ”’
The entry at at, and where the next one starts.
u16_at
u32_at