Documentation
¶
Index ¶
- Constants
- func Checksum(rAt io.ReaderAt, off, n int64) (checksum [sha256.Size]byte, err error)
- type Appendable
- type Metadata
- func (m *Metadata) Bytes() []byte
- func (m *Metadata) Get(key string) ([]byte, bool)
- func (m *Metadata) GetInt(key string) (int, bool)
- func (m *Metadata) Put(key string, value []byte)
- func (m *Metadata) PutInt(key string, n int)
- func (m *Metadata) ReadFrom(r io.Reader) (int64, error)
- func (m *Metadata) WriteTo(w io.Writer) (n int64, err error)
- type Reader
- func (r *Reader) Offset() int64
- func (r *Reader) Read(bs []byte) (n int, err error)
- func (r *Reader) ReadByte() (byte, error)
- func (r *Reader) ReadCount() int64
- func (r *Reader) ReadUint16() (uint16, error)
- func (r *Reader) ReadUint32() (uint32, error)
- func (r *Reader) ReadUint64() (uint64, error)
- func (r *Reader) Reset()
Constants ¶
View Source
const ( NoCompression = iota FlateCompression GZipCompression LZWCompression ZLibCompression )
View Source
const ( BestSpeed = flate.BestSpeed BestCompression = flate.BestCompression DefaultCompression = flate.DefaultCompression HuffmanOnly = flate.HuffmanOnly )
View Source
const DefaultCompressionFormat = NoCompression
View Source
const DefaultCompressionLevel = BestSpeed
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Appendable ¶
type Appendable interface {
Metadata() []byte
Size() (int64, error)
Offset() int64
SetOffset(off int64) error
DiscardUpto(off int64) error
Append(bs []byte) (off int64, n int, err error)
Flush() error
Sync() error
SwitchToReadOnlyMode() error
ReadAt(bs []byte, off int64) (int, error)
Close() error
Copy(dstPath string) error
CompressionFormat() int
CompressionLevel() int
}
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func NewMetadata ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadUint16 ¶ added in v1.2.0
func (*Reader) ReadUint32 ¶
func (*Reader) ReadUint64 ¶
Click to show internal directories.
Click to hide internal directories.