package rcompress
import "go-hep.org/x/hep/groot/internal/rcompress"
rcompress provides types and functions to compress and decompress ROOT data payloads.
Index ¶
- Constants
- Variables
- func Compress(dst, src []byte, compr int32) ([]byte, error)
- func Decompress(dst []byte, src io.Reader) error
- type Kind
- type Settings
Constants ¶
const HeaderSize = 9
Note: this contains ZL[src][dst] where src and dst are 3 bytes each.
Variables ¶
DefaultSettings is the default compression algorithm and level used in ROOT files and trees.
Functions ¶
func Compress ¶
Compress compresses src, using the compression kind and level encoded into compr. Users can provide a non-nil dst to reduce allocation.
func Decompress ¶
Decompress decompresses src into dst.
Types ¶
type Kind ¶
type Kind int
Kind specifies the compression algorithm to be used during reading or writing ROOT files.
const ( Inherit Kind = -1 UseGlobal Kind = 0 ZLIB Kind = +1 LZMA Kind = +2 OldCompression Kind = +3 LZ4 Kind = +4 ZSTD Kind = +5 UndefinedCompression Kind = +6 )
constants for compression/decompression
func (Kind) String ¶
type Settings ¶
Settings encodes the ROOT way of specifying a compression mechanism and its compression level.
func SettingsFrom ¶
SettingsFrom create a Settings value from the provided compression configuration (compression algorithm and compression level), using ROOT's encoding.
func (Settings) Compression ¶
Source Files ¶
kind_string.go rcompress.go
- Version
- v0.36.0 (latest)
- Published
- Nov 15, 2024
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 2 days ago –
Tools for package owners.