Zip decompressor1/22/2024 If only the MS-DOS date is present, the timezone is assumed to be UTC. // When reading, an extended timestamp is preferred over the legacy MS-DOS // date field, and the offset between the times is used as the timezone. Method uint16 // Modified is the modified time of the file. 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. // 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. func (w *Writer) SetComment(comment string) error.func (w *Writer) RegisterCompressor(method uint16, comp Compressor).func (w *Writer) CreateRaw(fh *FileHeader) (io.Writer, error).func (w *Writer) CreateHeaderRaw(fh *FileHeader) (io.Writer, error). ![]() func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error).func (w *Writer) Create(name string) (io.Writer, error).func (z *Reader) RegisterDecompressor(method uint16, dcomp Decompressor). ![]() func (r *Reader) Open(name string) (fs.File, error).func NewReader(r io.ReaderAt, size int64) (*Reader, error).func OpenReader(name string) (*ReadCloser, error).func (h *FileHeader) SetMode(mode fs.FileMode).func (h *FileHeader) SetModTime(t time.Time) deprecated.func (h *FileHeader) Mode() (mode fs.FileMode).func (h *FileHeader) ModTime() time.Time deprecated.func (h *FileHeader) FileInfo() fs.FileInfo.func FileInfoHeader(fi fs.FileInfo) (*FileHeader, error). ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |