hep: go-hep.org/x/hep/groot/internal/rcompress Index | Files

package rcompress

import "go-hep.org/x/hep/groot/internal/rcompress"

rcompress provides types and functions to compress and decompress ROOT data payloads.

Index

Package Files

rcompress.go

Constants

const HeaderSize = 9

Note: this contains ZL[src][dst] where src and dst are 3 bytes each.

Variables

var DefaultSettings = Settings{Alg: ZLIB, Lvl: flate.BestSpeed}

DefaultSettings is the default compression algorithm and level used in ROOT files and trees.

func Compress Uses

func Compress(dst, src []byte, compr int32) ([]byte, error)

Compress compresses src, using the compression kind and level encoded into compr. Users can provide a non-nil dst to reduce allocation.

func Decompress Uses

func Decompress(dst []byte, src io.Reader) error

Decompress decompresses src into dst.

type Kind Uses

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

type Settings Uses

type Settings struct {
    Alg Kind
    Lvl int
}

Settings encodes the ROOT way of specifying a compression mechanism and its compression level.

func (Settings) Compression Uses

func (set Settings) Compression() int32

Package rcompress imports 10 packages (graph) and is imported by 2 packages. Updated 2020-10-19. Refresh now. Tools for package owners.