encoders

package
v0.0.0-...-914eaba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type uint8

Type denotes the type of encoder

const (
	EncoderTypeLZ4CustomDeprecated Type = iota // EncoderTypeLZ4Custom : LZ4 encoder / compressor with custom checksum stripping (default, hence allocated the value 0)
	EncoderTypeNull                            // EncoderTypeNull : Null encoder
	EncoderTypeZSTD                            // EncoderTypeZSTD : ZSTD encoder / compressor
	EncoderTypeLZ4                             // EncoderTypeLZ4 ; LZ4 encoder / compressor based on available lz4 system library (1.9.4 recommended for performance)

	// MaxEncoderType should always be the last entry
	MaxEncoderType = EncoderTypeLZ4
)

IMPORTANT: When implementing new encoders, make sure to add the type above MaxEncoderType. Otherwise, compatibility with existing databases is broken

func GetTypeByString

func GetTypeByString(t string) (Type, error)

GetTypeByString returns the encoder type based on a named string

func (Type) String

func (t Type) String() string

String returns a string representation of the encoding type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL