Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CompressNone is a null compression format. CompressNone // CompressBzip2 is a Bzip2 compression format. CompressBzip2 // CompressGzip is a Gzip compression format. CompressGzip // CompressXZ is a XZ compression format. CompressXZ )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
Name string
LinkName string
Size int64
Mode os.FileMode
User string
Group string
ModTime time.Time
}
Header is an archive file header.
func (*Header) FileInfo ¶
FileInfo returns an os.FileInfo for the archive header.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is an archive reader.
func NewReader ¶
NewReader creates a new archive reader instance given an io.Reader and a compression format.
func (*Reader) Next ¶
Next advances to the next entry in the archive (see archive/tar Reader.Next for details).
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is an archive writer.
func NewWriter ¶
NewWriter creates a new archive writer instance given an io.Writer and a compression format.
func (*Writer) Write ¶
Write writes a file in the archive.
type WriterBuffer ¶
type WriterBuffer struct {
*Writer
// contains filtered or unexported fields
}
WriterBuffer is an archive writer buffer.
func NewWriterBuffer ¶
func NewWriterBuffer(compress int) (*WriterBuffer, error)
NewWriterBuffer creates a new archive writer buffer instance given a compression format.
func (*WriterBuffer) Bytes ¶
func (w *WriterBuffer) Bytes() []byte
Bytes returns the unread content of the archive writer buffer.
Source Files
¶
- archive.go
- error.go
- header.go
- reader.go
- writer.go
Click to show internal directories.
Click to hide internal directories.