Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Less ¶ added in v0.6.0
func Less(a, b *FrameOffsetEntry) bool
Types ¶
type FrameOffsetEntry ¶
type FrameOffsetEntry struct {
// ID is the is the sequence number of the frame in the index.
ID int64
// CompOffset is the offset within compressed stream.
CompOffset uint64
// DecompOffset is the offset within decompressed stream.
DecompOffset uint64
// CompSize is the size of the compressed frame.
CompSize uint32
// DecompSize is the size of the original data.
DecompSize uint32
// Checksum is the lower 32 bits of the XXH64 hash of the uncompressed data.
Checksum uint32
}
FrameOffsetEntry is the post-proccessed view of the Seek_Table_Entries suitable for indexing.
func (*FrameOffsetEntry) MarshalLogObject ¶
func (o *FrameOffsetEntry) MarshalLogObject(enc zapcore.ObjectEncoder) error
type REnvironment ¶
type REnvironment interface {
// GetFrameByIndex returns the compressed frame by its index.
GetFrameByIndex(index FrameOffsetEntry) ([]byte, error)
ReadFooter() ([]byte, error)
// ReadSkipFrame returns the full Seek Table Skippable frame
// including the `Skippable_Magic_Number` and `Frame_Size`.
ReadSkipFrame(skippableFrameOffset int64) ([]byte, error)
}
REnvironment can be used to inject a custom file reader that is different from normal ReadSeeker. This is useful when, for example there is a custom chunking code.
type WEnvironment ¶
type WEnvironment interface {
// WriteFrame is called each time frame is encoded and needs to be written upstream.
WriteFrame(p []byte) (n int, err error)
// WriteSeekTable is called on Close to flush the seek table.
WriteSeekTable(p []byte) (n int, err error)
}
WEnvironment can be used to inject a custom file writer that is different from normal WriteCloser. This is useful when, for example there is a custom chunking code.
Click to show internal directories.
Click to hide internal directories.