packedintset

package
v0.0.0-...-e834411 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package packedintset implements a way to store integer sets in compact form.

Integers to be packed must already be sorted. They are converted into delta-encoded varints and then zlib-compressed.

This is used primarily in `cas` binary to store sets of file sizes it downloads or uploads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pack

func Pack(values []int64) ([]byte, error)

Pack returns a deflate'd buffer of delta encoded varints.

Inputs must be sorted in ascending order already.

func Unpack

func Unpack(data []byte) ([]int64, error)

Unpack decompresses a deflate'd delta encoded list of varints.

Types

This section is empty.

Jump to

Keyboard shortcuts

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