NonUTF8 bool CreatorVersion uint16 ReaderVersion uint16 Flags uint16 // Method is the compression method. Otherwise, the Writer // automatically sets the ZIP format's UTF-8 flag for valid UTF-8 strings.
ZIP READER PKWARE ZIP FILE
// This flag should only be set if the user intends to encode a non-portable // ZIP file for a specific localized region. // By specification, the only other encoding permitted should be CP-437, // but historically many ZIP readers interpret Name and Comment as whatever // the system's local character encoding happens to be. Name string // Comment is any arbitrary user-defined string shorter than 64KiB.Ĝomment string // NonUTF8 indicates that Name and Comment are not encoded in UTF-8. It is the caller's responsibility to sanitize it as // appropriate, including canonicalizing slash directions, // validating that paths are relative, and preventing path // traversal through filenames ("./././"). // When reading zip files, the Name field is populated from // the zip file directly and is not validated for correctness. A trailing slash // indicates that this file is a directory and should have no data. // It must be a relative path, not start with a drive letter (such as "C:"), // and must use forward slashes instead of back slashes.
ZIP READER PKWARE 64 BIT
The ZIP64 format the 32 bit fields will be 0xffffffff and the 64 bit The 64 bit fields will always contain the correct value andįor normal archives both fields will be the same. To be backwards compatible the FileHeader has both 32 and 64 bit Sizeįields. This package does not support disk spanning. Package zip provides support for reading and writing ZIP archives.