package compress
import "github.com/ClickHouse/ch-go/compress"
Package compress implements compression support.
Index ¶
- Constants
- func FormatU128(v city.U128) string
- func MethodStrings() []string
- type CorruptedDataErr
- type Level
- type Method
- func MethodString(s string) (Method, error)
- func MethodValues() []Method
- func (i Method) IsAMethod() bool
- func (i Method) String() string
- type Reader
- type Writer
Constants ¶
Possible compression methods.
Functions ¶
func FormatU128 ¶
FormatU128 formats city.U128 as hex.
func MethodStrings ¶
func MethodStrings() []string
MethodStrings returns a slice of all String values of the enum
Types ¶
type CorruptedDataErr ¶
CorruptedDataErr means that provided hash mismatch with calculated.
func (*CorruptedDataErr) Error ¶
func (c *CorruptedDataErr) Error() string
type Level ¶
type Level uint32
Level for supporting compression codecs.
type Method ¶
type Method byte
Method is compression codec.
func MethodString ¶
MethodString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func MethodValues ¶
func MethodValues() []Method
MethodValues returns all values of the enum
func (Method) IsAMethod ¶
IsAMethod returns "true" if the value is listed in the enum definition. "false" otherwise
func (Method) String ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader decodes compressed blocks.
func NewReader ¶
NewReader returns new *Reader from r.
func (*Reader) Read ¶
Read implements io.Reader.
type Writer ¶
type Writer struct { Data []byte // contains filtered or unexported fields }
Writer encodes compressed blocks.
func NewWriter ¶
NewWriter creates a new Writer with the specified compression level that supports the specified method.
func (*Writer) Compress ¶
Compress buf into Data.
Source Files ¶
compress.go method_enum.go reader.go writer.go
- Version
- v0.65.1 (latest)
- Published
- Feb 18, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- now –
Tools for package owners.