go1.20.5
GoThrough

zip.Deflate

// Compression methods. const Deflate = 8

zip.Store

// Compression methods. const Store = 0

zip.ErrAlgorithm

var ErrAlgorithm = errors.New("zip: unsupported compression algorithm")

zip.ErrChecksum

var ErrChecksum = errors.New("zip: checksum error")

zip.ErrFormat

var ErrFormat = errors.New("zip: not a valid zip file")

zip.ErrInsecurePath

var ErrInsecurePath = errors.New("zip: insecure file path")

zip.FileInfoHeader

// FileInfoHeader creates a partially-populated FileHeader from an // fs.FileInfo. // Because fs.FileInfo's Name method returns only the base name of // the file it describes, it may be necessary to modify the Name field // of the returned header to provide the full path name of the file. // If compression is desired, callers should set the FileHeader.Method // field; it is unset by default. func FileInfoHeader(fi fs.FileInfo) (*FileHeader, error)

zip.NewReader

// NewReader returns a new Reader reading from r, which is assumed to // have the given size in bytes. // // If any file inside the archive uses a non-local name // (as defined by [filepath.IsLocal]) or a name containing backslashes // and the GODEBUG environment variable contains `zipinsecurepath=0`, // NewReader returns the reader with an ErrInsecurePath error. // A future version of Go may introduce this behavior by default. // Programs that want to accept non-local names can ignore // the ErrInsecurePath error and use the returned reader. func NewReader(r io.ReaderAt, size int64) (*Reader, error)

zip.NewWriter

// NewWriter returns a new Writer writing a zip file to w. func NewWriter(w io.Writer) *Writer

zip.OpenReader

// OpenReader will open the Zip file specified by name and return a ReadCloser. func OpenReader(name string) (*ReadCloser, error)

zip.RegisterCompressor

// RegisterCompressor registers custom compressors for a specified method ID. // The common methods Store and Deflate are built in. func RegisterCompressor(method uint16, comp Compressor)

zip.RegisterDecompressor

// RegisterDecompressor allows custom decompressors for a specified method ID. // The common methods Store and Deflate are built in. func RegisterDecompressor(method uint16, dcomp Decompressor)