Documentation ¶
Index ¶
- Variables
- type BlockCompress
- func (b BlockCompress) BuildCompressStream(w io.ReadWriteCloser) (io.ReadWriteCloser, error)
- func (BlockCompress) Descriptor() protoreflect.EnumDescriptor
- func (x BlockCompress) Enum() *BlockCompress
- func (BlockCompress) EnumDescriptor() ([]byte, []int)deprecated
- func (x BlockCompress) Number() protoreflect.EnumNumber
- func (x BlockCompress) String() string
- func (BlockCompress) Type() protoreflect.EnumType
- type Lz4Stream
- type S2Stream
- type SnappyStream
- type ZStdStream
Constants ¶
This section is empty.
Variables ¶
var ( BlockCompress_name = map[int32]string{ 0: "BlockCompress_NONE", 1: "BlockCompress_SNAPPY", 2: "BlockCompress_S2", 3: "BlockCompress_LZ4", 4: "BlockCompress_ZSTD", } BlockCompress_value = map[string]int32{ "BlockCompress_NONE": 0, "BlockCompress_SNAPPY": 1, "BlockCompress_S2": 2, "BlockCompress_LZ4": 3, "BlockCompress_ZSTD": 4, } )
Enum value maps for BlockCompress.
var File_github_com_aperturerobotics_bifrost_util_blockcompress_blockcompress_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BlockCompress ¶
type BlockCompress int32
BlockCompress sets the type of compression to use.
const ( // BlockCompress_NONE indicates no compression. BlockCompress_BlockCompress_NONE BlockCompress = 0 // BlockCompress_SNAPPY indicates Snappy compression. BlockCompress_BlockCompress_SNAPPY BlockCompress = 1 // BlockCompress_S2 indicates S2 compression. // // S2 is an extension of snappy. S2 is aimed for high throughput, which is why // it features concurrent compression for bigger payloads. Decoding is // compatible with Snappy compressed content, but content compressed with S2 // cannot be decompressed by Snappy. This means that S2 can seamlessly replace // Snappy without converting compressed content. S2 is designed to have high // throughput on content that cannot be compressed. This is important so you // don't have to worry about spending CPU cycles on already compressed data. // // Reference: https://github.com/klauspost/compress/tree/master/s2 BlockCompress_BlockCompress_S2 BlockCompress = 2 // BlockCompress_LZ4 indicates LZ4 compression. BlockCompress_BlockCompress_LZ4 BlockCompress = 3 // BlockCompress_ZSTD indicates z-standard compression. // // Zstandard is a real-time compression algorithm, providing high compression // ratios. It offers a very wide range of compression / speed trade-off, while // being backed by a very fast decoder. A high performance compression // algorithm is implemented. BlockCompress_BlockCompress_ZSTD BlockCompress = 4 )
func (BlockCompress) BuildCompressStream ¶
func (b BlockCompress) BuildCompressStream(w io.ReadWriteCloser) (io.ReadWriteCloser, error)
BuildCompressStream builds the compression stream for the given block crypto type.
func (BlockCompress) Descriptor ¶ added in v0.2.0
func (BlockCompress) Descriptor() protoreflect.EnumDescriptor
func (BlockCompress) Enum ¶ added in v0.2.0
func (x BlockCompress) Enum() *BlockCompress
func (BlockCompress) EnumDescriptor
deprecated
func (BlockCompress) EnumDescriptor() ([]byte, []int)
Deprecated: Use BlockCompress.Descriptor instead.
func (BlockCompress) Number ¶ added in v0.2.0
func (x BlockCompress) Number() protoreflect.EnumNumber
func (BlockCompress) String ¶
func (x BlockCompress) String() string
func (BlockCompress) Type ¶ added in v0.2.0
func (BlockCompress) Type() protoreflect.EnumType
type Lz4Stream ¶
type Lz4Stream struct { io.ReadWriteCloser // contains filtered or unexported fields }
Lz4Stream implements a lz4 compression backed stream.
func NewLz4Stream ¶
func NewLz4Stream(conn io.ReadWriteCloser) *Lz4Stream
NewLz4Stream constructs a new cmp compression stream.
type S2Stream ¶
type S2Stream struct { io.ReadWriteCloser // contains filtered or unexported fields }
S2Stream implements a s2 compression backed stream.
func NewS2Stream ¶
func NewS2Stream(conn io.ReadWriteCloser) *S2Stream
NewS2Stream constructs a new s2 compression stream.
type SnappyStream ¶
type SnappyStream struct { io.ReadWriteCloser // contains filtered or unexported fields }
SnappyStream implements a snappy compression backed stream.
func NewSnappyStream ¶
func NewSnappyStream(conn io.ReadWriteCloser) *SnappyStream
NewSnappyStream constructs a new snappy compression stream.
func (*SnappyStream) Close ¶
func (c *SnappyStream) Close() error
Close implements io.ReadWriteCloser
type ZStdStream ¶
type ZStdStream struct { io.ReadWriteCloser // contains filtered or unexported fields }
ZStdStream implements a zstd compression backed stream.
func NewZStdStream ¶
func NewZStdStream(conn io.ReadWriteCloser) *ZStdStream
NewZStdStream constructs a new cmp compression stream.