Documentation
¶
Index ¶
- Constants
- type BlockHeader
- type BytesSlice
- type CompressedBytesSlice
- func (cs *CompressedBytesSlice) BlockCount() int
- func (cs *CompressedBytesSlice) BlockDataLen(i int) int
- func (cs *CompressedBytesSlice) BlockLen(i int) int
- func (cs CompressedBytesSlice) Compress(src [][]byte, encoder any) CompressedBytesSlice
- func (cs CompressedBytesSlice) CompressBytes(src []byte, offsets []int, encoder any) CompressedBytesSlice
- func (cs *CompressedBytesSlice) CompressedSize() int
- func (cs *CompressedBytesSlice) DataLen() int
- func (cs *CompressedBytesSlice) Decompress(dst BytesSlice, decoder any) BytesSlice
- func (cs *CompressedBytesSlice) DecompressBlock(dst BytesSlice, i int, decoder any) (BytesSlice, int)
- func (cs *CompressedBytesSlice) DecompressBlockBytes(dst []byte, dstOffsets []int, i int, decoder any) ([]byte, []int, int)
- func (cs *CompressedBytesSlice) DecompressBytes(dst []byte, dstOffsets []int, decoder any) ([]byte, []int)
- func (cs *CompressedBytesSlice) IsBlockCompressed(i int) bool
- func (cs *CompressedBytesSlice) Len() int
- func (cs *CompressedBytesSlice) MemSize() int
- type CompressedSlice
- func (cs *CompressedSlice[T]) BlockCount() int
- func (cs *CompressedSlice[T]) BlockFirstValue(i int) T
- func (cs *CompressedSlice[T]) BlockLen(i int) int
- func (cs *CompressedSlice[T]) BlockMinMax(i int) (T, T)
- func (cs CompressedSlice[T]) Compress(src []T) CompressedSlice[T]
- func (cs CompressedSlice[T]) CompressLossy(src []T, maxBits int) CompressedSlice[T]
- func (cs *CompressedSlice[T]) CompressedSize() int
- func (cs *CompressedSlice[T]) Decompress(dst []T) []T
- func (cs *CompressedSlice[T]) DecompressBlock(dst []T, i int) ([]T, int)
- func (cs *CompressedSlice[T]) IsBlockCompressed(i int) bool
- func (cs *CompressedSlice[T]) Len() int
- func (cs *CompressedSlice[T]) MemSize() int
- func (cs *CompressedSlice[T]) WithMinMax(v bool)
- type PackType
Constants ¶
const MaxGroups = 4 * len(BlockHeader{})
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type BlockHeader [2]uint64
BlockHeader is a uint64 used to store the number of bits in a group (7 bits) and the number of trailing zeros (6 bits). up to 4 groups can be stored in a block header. the number of groups are stored in the first 4 bits of the header.
func (BlockHeader) AddGroup ¶
func (bh BlockHeader) AddGroup(bitlen, ntz int) BlockHeader
AddGroup adds a group of bits to the block header. bitlen is the number of bits in the group, and ntz is the number of trailing zeros. bitlen and ntz are stored in the header as 6-bit values. adding a group increases the number of groups in the header by 1.
func (BlockHeader) BlockLen ¶
func (bh BlockHeader) BlockLen() int
BlockLen returns the number of compressed uint64 in the block not including the header.
func (BlockHeader) GetGroup ¶
func (bh BlockHeader) GetGroup(i int) (int, int)
GetGroup returns the bitlen and ntz of the group at index i.
func (BlockHeader) GroupCount ¶
func (bh BlockHeader) GroupCount() int
GroupCount returns the number of groups in the block header.
type BytesSlice ¶
type BytesSlice struct {
// contains filtered or unexported fields
}
func (*BytesSlice) Len ¶
func (bs *BytesSlice) Len() int
func (*BytesSlice) Reset ¶
func (bs *BytesSlice) Reset()
func (*BytesSlice) Value ¶
func (bs *BytesSlice) Value(i int) []byte
func (*BytesSlice) Values ¶
func (bs *BytesSlice) Values(dst [][]byte) [][]byte
func (*BytesSlice) ValuesBytes ¶
func (bs *BytesSlice) ValuesBytes() ([]byte, []int)
type CompressedBytesSlice ¶
type CompressedBytesSlice struct {
// contains filtered or unexported fields
}
func (*CompressedBytesSlice) BlockCount ¶
func (cs *CompressedBytesSlice) BlockCount() int
func (*CompressedBytesSlice) BlockDataLen ¶
func (cs *CompressedBytesSlice) BlockDataLen(i int) int
func (*CompressedBytesSlice) BlockLen ¶
func (cs *CompressedBytesSlice) BlockLen(i int) int
func (CompressedBytesSlice) Compress ¶
func (cs CompressedBytesSlice) Compress(src [][]byte, encoder any) CompressedBytesSlice
func (CompressedBytesSlice) CompressBytes ¶
func (cs CompressedBytesSlice) CompressBytes(src []byte, offsets []int, encoder any) CompressedBytesSlice
func (*CompressedBytesSlice) CompressedSize ¶
func (cs *CompressedBytesSlice) CompressedSize() int
func (*CompressedBytesSlice) DataLen ¶
func (cs *CompressedBytesSlice) DataLen() int
func (*CompressedBytesSlice) Decompress ¶
func (cs *CompressedBytesSlice) Decompress(dst BytesSlice, decoder any) BytesSlice
func (*CompressedBytesSlice) DecompressBlock ¶
func (cs *CompressedBytesSlice) DecompressBlock(dst BytesSlice, i int, decoder any) (BytesSlice, int)
func (*CompressedBytesSlice) DecompressBlockBytes ¶
func (*CompressedBytesSlice) DecompressBytes ¶
func (*CompressedBytesSlice) IsBlockCompressed ¶
func (cs *CompressedBytesSlice) IsBlockCompressed(i int) bool
func (*CompressedBytesSlice) Len ¶
func (cs *CompressedBytesSlice) Len() int
func (*CompressedBytesSlice) MemSize ¶
func (cs *CompressedBytesSlice) MemSize() int
type CompressedSlice ¶
type CompressedSlice[T PackType] struct { // contains filtered or unexported fields }
func (*CompressedSlice[T]) BlockCount ¶
func (cs *CompressedSlice[T]) BlockCount() int
func (*CompressedSlice[T]) BlockFirstValue ¶
func (cs *CompressedSlice[T]) BlockFirstValue(i int) T
func (*CompressedSlice[T]) BlockLen ¶
func (cs *CompressedSlice[T]) BlockLen(i int) int
func (*CompressedSlice[T]) BlockMinMax ¶
func (cs *CompressedSlice[T]) BlockMinMax(i int) (T, T)
func (CompressedSlice[T]) Compress ¶
func (cs CompressedSlice[T]) Compress(src []T) CompressedSlice[T]
func (CompressedSlice[T]) CompressLossy ¶
func (cs CompressedSlice[T]) CompressLossy(src []T, maxBits int) CompressedSlice[T]
func (*CompressedSlice[T]) CompressedSize ¶
func (cs *CompressedSlice[T]) CompressedSize() int
func (*CompressedSlice[T]) Decompress ¶
func (cs *CompressedSlice[T]) Decompress(dst []T) []T
func (*CompressedSlice[T]) DecompressBlock ¶
func (cs *CompressedSlice[T]) DecompressBlock(dst []T, i int) ([]T, int)
func (*CompressedSlice[T]) IsBlockCompressed ¶
func (cs *CompressedSlice[T]) IsBlockCompressed(i int) bool
func (*CompressedSlice[T]) Len ¶
func (cs *CompressedSlice[T]) Len() int
func (*CompressedSlice[T]) MemSize ¶
func (cs *CompressedSlice[T]) MemSize() int
func (*CompressedSlice[T]) WithMinMax ¶
func (cs *CompressedSlice[T]) WithMinMax(v bool)