Versions in this module Expand all Collapse all v1 v1.0.1 Jul 22, 2024 Changes in this version + const Deflate + const Store + var ErrAlgorithm = errors.New("zip: unsupported compression algorithm") + var ErrAuthentication = errors.New("zip: authentication failed") + var ErrChecksum = errors.New("zip: checksum error") + var ErrDecryption = errors.New("zip: decryption error") + var ErrFormat = errors.New("zip: not a valid zip file") + var ErrPassword = errors.New("zip: invalid password") + func DeCompressZip(zipFile []byte, passwd string) (error, []*zip.File) + func RegisterCompressor(method uint16, comp Compressor) + func RegisterDecompressor(method uint16, d Decompressor) + func ZipCryptoDecryptor(r *io.SectionReader, password []byte) (*io.SectionReader, error) + type Compressor func(io.Writer) (io.WriteCloser, error) + type Decompressor func(io.Reader) io.ReadCloser + type File struct + func (f *File) DataOffset() (offset int64, err error) + func (f *File) Open() (rc io.ReadCloser, err error) + type FileHeader struct + CRC32 uint32 + Comment string + CompressedSize uint32 + CompressedSize64 uint64 + CreatorVersion uint16 + DeferAuth bool + ExternalAttrs uint32 + Extra []byte + Flags uint16 + Method uint16 + ModifiedDate uint16 + ModifiedTime uint16 + Name string + ReaderVersion uint16 + UncompressedSize uint32 + UncompressedSize64 uint64 + func FileInfoHeader(fi os.FileInfo) (*FileHeader, error) + func (h *FileHeader) FileInfo() os.FileInfo + func (h *FileHeader) IsEncrypted() bool + func (h *FileHeader) ModTime() time.Time + func (h *FileHeader) Mode() (mode os.FileMode) + func (h *FileHeader) SetModTime(t time.Time) + func (h *FileHeader) SetMode(mode os.FileMode) + func (h *FileHeader) SetPassword(password string) + type ReadCloser struct + func OpenReader(name string) (*ReadCloser, error) + func (rc *ReadCloser) Close() error + type Reader struct + Comment string + File []*File + func NewReader(r io.ReaderAt, size int64) (*Reader, error) + type Writer struct + func NewWriter(w io.Writer) *Writer + func (w *Writer) Close() error + func (w *Writer) Create(name string) (io.Writer, error) + func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error) + func (w *Writer) Encrypt(name string, password string) (io.Writer, error) + func (w *Writer) Flush() error + func (w *Writer) SetOffset(n int64) + type ZipCrypto struct + Keys [3]uint32 + func NewZipCrypto(passphrase []byte) *ZipCrypto + func (z *ZipCrypto) Decrypt(chiper []byte) []byte + func (z *ZipCrypto) Encrypt(data []byte) []byte