Documentation
¶
Index ¶
- Variables
- func Inflate(name string, reader io.Reader, path string) error
- func InflateTar(reader io.Reader, path string) (retErr error)
- func InflateTarGz(reader io.Reader, path string) error
- func InflateTarXz(reader io.Reader, path string) error
- func InflateZip(reader io.Reader, path string) (retErr error)
- type HashingReader
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownArchiveFormat = errors.New("unknown archive format")
ErrUnknownArchiveFormat is error returned when file is not recognized as archive.
Functions ¶
func InflateTar ¶
InflateTar inflates tar archive.
func InflateTarGz ¶
InflateTarGz inflates tar.gz archive.
func InflateTarXz ¶
InflateTarXz inflates tar.xz archive.
Types ¶
type HashingReader ¶ added in v0.3.0
type HashingReader struct {
// contains filtered or unexported fields
}
HashingReader reads stream, computes and verifies checksum.
func NewHashingReader ¶ added in v0.3.0
func NewHashingReader(reader io.Reader, checksum string) (*HashingReader, error)
NewHashingReader creates new hashing reader.
func (*HashingReader) Read ¶ added in v0.3.0
func (hr *HashingReader) Read(p []byte) (int, error)
Read reads bytes from stream.
func (*HashingReader) ValidateChecksum ¶ added in v0.3.0
func (hr *HashingReader) ValidateChecksum() error
ValidateChecksum validates checksum. Before validating it reads all the remaining bytes from stream to ensure that checksum is computed from all bytes.
Click to show internal directories.
Click to hide internal directories.