Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDecompressor ¶
func RegisterDecompressor(method []byte, dcomp Decompressor)
RegisterDecompressor allows custom decompressors for a specified method ID.
Types ¶
type Decompressor ¶
type Decompressor func([]byte, uint64, ...io.ReadCloser) (io.ReadCloser, error)
Decompressor describes the function signature that decompression/decryption methods must implement to return a new instance of themselves. They are passed any property bytes, the size of the stream and a varying number of, but nearly always one, io.ReadCloser providing the stream of bytes. Blame (currently unimplemented) BCJ2 for that one.
type File ¶
type File struct {
FileHeader
// contains filtered or unexported fields
}
type FileHeader ¶
type FileHeader struct {
Name string
Created time.Time
Accessed time.Time
Modified time.Time
Attributes uint32
CRC32 uint32
UncompressedSize uint64
}
func (*FileHeader) FileInfo ¶
func (h *FileHeader) FileInfo() os.FileInfo
func (*FileHeader) Mode ¶
func (h *FileHeader) Mode() (mode os.FileMode)
type ReadCloser ¶
type ReadCloser struct {
Reader
// contains filtered or unexported fields
}
func OpenReader ¶
func OpenReader(name string) (*ReadCloser, error)
func OpenReaderWithPassword ¶
func OpenReaderWithPassword(name, password string) (*ReadCloser, error)
func (*ReadCloser) Close ¶
func (rc *ReadCloser) Close() error
Click to show internal directories.
Click to hide internal directories.