Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const CompressionLevelDefault + const CompressionLevelFlateBestSpeed + const CompressionLevelNone + var ErrBadMagic = fmt.Errorf("bad magic header") + var ErrInvalidFlags = fmt.Errorf("flags set is invalid") + var ErrInvalidMetadataLength = fmt.Errorf("metadata length invalid, maximum size is %d", maxMetadataSize) + var ErrMetadataInvalid = fmt.Errorf("metadata invalid, can't start with _") + var ErrMetadataMissing = fmt.Errorf("missing metadata") + func MetadataUnsafe(r io.Reader) (map[string]string, error) + func NewReader(r io.Reader, key []byte) (io.Reader, map[string]string, error) + func NewWriter(w io.Writer, key []byte, metadata map[string]string) (io.WriteCloser, error) + type AsyncReader struct + func NewAsyncReader(in *fd.FD, off int64) *AsyncReader + func (r *AsyncReader) Close() error + func (r *AsyncReader) ReadAsync(p []byte) + func (r *AsyncReader) Wait() error + type CompressionLevel string + func CompressionLevelFromMetadata(metadata map[string]string) (CompressionLevel, error) + func CompressionLevelFromString(val string) (CompressionLevel, error) + type Options struct + Compression CompressionLevel + Resume bool + func (o Options) WriteToMetadata(metadata map[string]string) map[string]string