dedup

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxPointsPerBlock = 1 << 15 // same as in block

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

type Allocator struct{}

func (Allocator) Alloc

func (a Allocator) Alloc(sz int) any

func (Allocator) AllocPtr

func (a Allocator) AllocPtr(sz int) unsafe.Pointer

func (Allocator) Free

func (a Allocator) Free(val any)

func (Allocator) FreePtr

func (a Allocator) FreePtr(ptr unsafe.Pointer)

type ByteArray

type ByteArray interface {
	Len() int
	Cap() int
	Elem(int) []byte         // index
	Set(int, []byte)         // index, buf
	SetZeroCopy(int, []byte) // index, buf
	Append(...[]byte) ByteArray
	AppendZeroCopy(...[]byte) ByteArray
	AppendFrom(ByteArray) ByteArray
	Insert(int, ...[]byte) ByteArray
	InsertFrom(int, ByteArray) ByteArray
	Copy(ByteArray, int, int, int) ByteArray // src, dstPos, srcPos, len (ReplaceFrom)
	Delete(int, int) ByteArray               // index, len
	Grow(int) ByteArray                      // len
	Clear()                                  // zero elements and length
	Release()                                // recycle buffers
	Slice() [][]byte
	Subslice(int, int) [][]byte // start, end
	MinMax() ([]byte, []byte)

	MaxEncodedSize() int
	HeapSize() int
	WriteTo(io.Writer) (int64, error)
	Decode([]byte) error

	Materialize() ByteArray // unpack to native [][]byte slice
	IsMaterialized() bool
	Optimize() ByteArray // analyzes and repacks into a single []byte buffer
	IsOptimized() bool

	// sort interface
	Less(int, int) bool
	Swap(int, int)

	// debug
	Dump() string

	// condition match interface
	MatchEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset
	MatchNotEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset
	MatchLessThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset
	MatchLessThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset
	MatchGreaterThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset
	MatchGreaterThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset
	MatchBetween(a, b []byte, bits, mask *vec.Bitset) *vec.Bitset
}

func Decode

func Decode(buf []byte, dst ByteArray, n int) (ByteArray, error)

func NewByteArray

func NewByteArray(sz int) ByteArray

func NewByteArrayFromBytes

func NewByteArrayFromBytes(b [][]byte) ByteArray

type CompactByteArray

type CompactByteArray struct {
	// contains filtered or unexported fields
}

func (*CompactByteArray) Append

func (a *CompactByteArray) Append(...[]byte) ByteArray

func (*CompactByteArray) AppendFrom

func (a *CompactByteArray) AppendFrom(ByteArray) ByteArray

func (*CompactByteArray) AppendZeroCopy

func (a *CompactByteArray) AppendZeroCopy(...[]byte) ByteArray

func (*CompactByteArray) Cap

func (a *CompactByteArray) Cap() int

func (*CompactByteArray) Clear

func (a *CompactByteArray) Clear()

func (*CompactByteArray) Copy

func (*CompactByteArray) Decode

func (a *CompactByteArray) Decode(buf []byte) error

func (*CompactByteArray) Delete

func (a *CompactByteArray) Delete(int, int) ByteArray

func (*CompactByteArray) Dump

func (a *CompactByteArray) Dump() string

func (*CompactByteArray) Elem

func (a *CompactByteArray) Elem(index int) []byte

func (*CompactByteArray) Grow

func (a *CompactByteArray) Grow(int) ByteArray

func (*CompactByteArray) HeapSize

func (a *CompactByteArray) HeapSize() int

func (*CompactByteArray) Insert

func (a *CompactByteArray) Insert(int, ...[]byte) ByteArray

func (*CompactByteArray) InsertFrom

func (a *CompactByteArray) InsertFrom(int, ByteArray) ByteArray

func (*CompactByteArray) IsMaterialized

func (a *CompactByteArray) IsMaterialized() bool

func (*CompactByteArray) IsOptimized

func (a *CompactByteArray) IsOptimized() bool

func (*CompactByteArray) Len

func (a *CompactByteArray) Len() int

func (*CompactByteArray) Less

func (a *CompactByteArray) Less(i, j int) bool

func (*CompactByteArray) MatchBetween

func (a *CompactByteArray) MatchBetween(from, to []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*CompactByteArray) MatchEqual

func (a *CompactByteArray) MatchEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*CompactByteArray) MatchGreaterThan

func (a *CompactByteArray) MatchGreaterThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*CompactByteArray) MatchGreaterThanEqual

func (a *CompactByteArray) MatchGreaterThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*CompactByteArray) MatchLessThan

func (a *CompactByteArray) MatchLessThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*CompactByteArray) MatchLessThanEqual

func (a *CompactByteArray) MatchLessThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*CompactByteArray) MatchNotEqual

func (a *CompactByteArray) MatchNotEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*CompactByteArray) Materialize

func (a *CompactByteArray) Materialize() ByteArray

func (*CompactByteArray) MaxEncodedSize

func (a *CompactByteArray) MaxEncodedSize() int

func (*CompactByteArray) MinMax

func (a *CompactByteArray) MinMax() ([]byte, []byte)

func (*CompactByteArray) Optimize

func (a *CompactByteArray) Optimize() ByteArray

func (*CompactByteArray) Release

func (a *CompactByteArray) Release()

func (*CompactByteArray) Set

func (a *CompactByteArray) Set(int, []byte)

func (*CompactByteArray) SetZeroCopy

func (a *CompactByteArray) SetZeroCopy(int, []byte)

func (*CompactByteArray) Slice

func (a *CompactByteArray) Slice() [][]byte

func (*CompactByteArray) Subslice

func (a *CompactByteArray) Subslice(start, end int) [][]byte

func (*CompactByteArray) Swap

func (a *CompactByteArray) Swap(i, j int)

func (*CompactByteArray) WriteTo

func (a *CompactByteArray) WriteTo(w io.Writer) (int64, error)

type DictByteArray

type DictByteArray struct {
	// contains filtered or unexported fields
}

func (*DictByteArray) Append

func (a *DictByteArray) Append(...[]byte) ByteArray

func (*DictByteArray) AppendFrom

func (a *DictByteArray) AppendFrom(ByteArray) ByteArray

func (*DictByteArray) AppendZeroCopy

func (a *DictByteArray) AppendZeroCopy(...[]byte) ByteArray

func (*DictByteArray) Cap

func (a *DictByteArray) Cap() int

func (*DictByteArray) Clear

func (a *DictByteArray) Clear()

func (*DictByteArray) Copy

func (*DictByteArray) Decode

func (a *DictByteArray) Decode(buf []byte) error

func (*DictByteArray) Delete

func (a *DictByteArray) Delete(int, int) ByteArray

func (*DictByteArray) Dump

func (a *DictByteArray) Dump() string

func (*DictByteArray) Elem

func (a *DictByteArray) Elem(index int) []byte

func (*DictByteArray) Grow

func (a *DictByteArray) Grow(int) ByteArray

func (*DictByteArray) HeapSize

func (a *DictByteArray) HeapSize() int

func (*DictByteArray) Insert

func (a *DictByteArray) Insert(int, ...[]byte) ByteArray

func (*DictByteArray) InsertFrom

func (a *DictByteArray) InsertFrom(int, ByteArray) ByteArray

func (*DictByteArray) IsMaterialized

func (a *DictByteArray) IsMaterialized() bool

func (*DictByteArray) IsOptimized

func (a *DictByteArray) IsOptimized() bool

func (*DictByteArray) Len

func (a *DictByteArray) Len() int

func (*DictByteArray) Less

func (a *DictByteArray) Less(i, j int) bool

func (*DictByteArray) MatchBetween

func (a *DictByteArray) MatchBetween(from, to []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*DictByteArray) MatchEqual

func (a *DictByteArray) MatchEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*DictByteArray) MatchGreaterThan

func (a *DictByteArray) MatchGreaterThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*DictByteArray) MatchGreaterThanEqual

func (a *DictByteArray) MatchGreaterThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*DictByteArray) MatchLessThan

func (a *DictByteArray) MatchLessThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*DictByteArray) MatchLessThanEqual

func (a *DictByteArray) MatchLessThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*DictByteArray) MatchNotEqual

func (a *DictByteArray) MatchNotEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*DictByteArray) Materialize

func (a *DictByteArray) Materialize() ByteArray

func (*DictByteArray) MaxEncodedSize

func (a *DictByteArray) MaxEncodedSize() int

func (*DictByteArray) MinMax

func (a *DictByteArray) MinMax() ([]byte, []byte)

func (*DictByteArray) Optimize

func (a *DictByteArray) Optimize() ByteArray

func (*DictByteArray) Release

func (a *DictByteArray) Release()

func (*DictByteArray) Set

func (a *DictByteArray) Set(int, []byte)

func (*DictByteArray) SetZeroCopy

func (a *DictByteArray) SetZeroCopy(int, []byte)

func (*DictByteArray) Slice

func (a *DictByteArray) Slice() [][]byte

func (*DictByteArray) Subslice

func (a *DictByteArray) Subslice(start, end int) [][]byte

func (*DictByteArray) Swap

func (a *DictByteArray) Swap(i, j int)

func (*DictByteArray) WriteTo

func (a *DictByteArray) WriteTo(w io.Writer) (int64, error)

type FixedByteArray

type FixedByteArray struct {
	// contains filtered or unexported fields
}

func (*FixedByteArray) Append

func (a *FixedByteArray) Append(...[]byte) ByteArray

func (*FixedByteArray) AppendFrom

func (a *FixedByteArray) AppendFrom(ByteArray) ByteArray

func (*FixedByteArray) AppendZeroCopy

func (a *FixedByteArray) AppendZeroCopy(...[]byte) ByteArray

func (*FixedByteArray) Cap

func (a *FixedByteArray) Cap() int

func (*FixedByteArray) Clear

func (a *FixedByteArray) Clear()

func (*FixedByteArray) Copy

func (*FixedByteArray) Decode

func (a *FixedByteArray) Decode(buf []byte) error

func (*FixedByteArray) Delete

func (a *FixedByteArray) Delete(int, int) ByteArray

func (*FixedByteArray) Dump

func (a *FixedByteArray) Dump() string

func (*FixedByteArray) Elem

func (a *FixedByteArray) Elem(index int) []byte

func (*FixedByteArray) Grow

func (a *FixedByteArray) Grow(int) ByteArray

func (*FixedByteArray) HeapSize

func (a *FixedByteArray) HeapSize() int

func (*FixedByteArray) Insert

func (a *FixedByteArray) Insert(int, ...[]byte) ByteArray

func (*FixedByteArray) InsertFrom

func (a *FixedByteArray) InsertFrom(int, ByteArray) ByteArray

func (*FixedByteArray) IsMaterialized

func (a *FixedByteArray) IsMaterialized() bool

func (*FixedByteArray) IsOptimized

func (a *FixedByteArray) IsOptimized() bool

func (*FixedByteArray) Len

func (a *FixedByteArray) Len() int

func (*FixedByteArray) Less

func (a *FixedByteArray) Less(i, j int) bool

func (*FixedByteArray) MatchBetween

func (a *FixedByteArray) MatchBetween(from, to []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*FixedByteArray) MatchEqual

func (a *FixedByteArray) MatchEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*FixedByteArray) MatchGreaterThan

func (a *FixedByteArray) MatchGreaterThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*FixedByteArray) MatchGreaterThanEqual

func (a *FixedByteArray) MatchGreaterThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*FixedByteArray) MatchLessThan

func (a *FixedByteArray) MatchLessThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*FixedByteArray) MatchLessThanEqual

func (a *FixedByteArray) MatchLessThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*FixedByteArray) MatchNotEqual

func (a *FixedByteArray) MatchNotEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*FixedByteArray) Materialize

func (a *FixedByteArray) Materialize() ByteArray

func (*FixedByteArray) MaxEncodedSize

func (a *FixedByteArray) MaxEncodedSize() int

func (*FixedByteArray) MinMax

func (a *FixedByteArray) MinMax() ([]byte, []byte)

func (*FixedByteArray) Optimize

func (a *FixedByteArray) Optimize() ByteArray

func (*FixedByteArray) Release

func (a *FixedByteArray) Release()

func (*FixedByteArray) Set

func (a *FixedByteArray) Set(int, []byte)

func (*FixedByteArray) SetZeroCopy

func (a *FixedByteArray) SetZeroCopy(int, []byte)

func (*FixedByteArray) Slice

func (a *FixedByteArray) Slice() [][]byte

func (*FixedByteArray) Subslice

func (a *FixedByteArray) Subslice(start, end int) [][]byte

func (*FixedByteArray) Swap

func (a *FixedByteArray) Swap(i, j int)

func (*FixedByteArray) WriteTo

func (a *FixedByteArray) WriteTo(w io.Writer) (int64, error)

type NativeByteArray

type NativeByteArray struct {
	// contains filtered or unexported fields
}

func (*NativeByteArray) Append

func (a *NativeByteArray) Append(vals ...[]byte) ByteArray

func (*NativeByteArray) AppendFrom

func (a *NativeByteArray) AppendFrom(src ByteArray) ByteArray

func (*NativeByteArray) AppendZeroCopy

func (a *NativeByteArray) AppendZeroCopy(vals ...[]byte) ByteArray

func (NativeByteArray) Cap

func (a NativeByteArray) Cap() int

func (*NativeByteArray) Clear

func (a *NativeByteArray) Clear()

func (*NativeByteArray) Copy

func (a *NativeByteArray) Copy(src ByteArray, dstPos, srcPos, n int) ByteArray

func (*NativeByteArray) Decode

func (a *NativeByteArray) Decode(buf []byte) error

func (*NativeByteArray) Delete

func (a *NativeByteArray) Delete(index, n int) ByteArray

func (*NativeByteArray) Dump

func (a *NativeByteArray) Dump() string

func (NativeByteArray) Elem

func (a NativeByteArray) Elem(index int) []byte

func (*NativeByteArray) Grow

func (a *NativeByteArray) Grow(n int) ByteArray

func (*NativeByteArray) HeapSize

func (a *NativeByteArray) HeapSize() int

func (*NativeByteArray) Insert

func (a *NativeByteArray) Insert(index int, vals ...[]byte) ByteArray

func (*NativeByteArray) InsertFrom

func (a *NativeByteArray) InsertFrom(index int, src ByteArray) ByteArray

func (NativeByteArray) IsMaterialized

func (a NativeByteArray) IsMaterialized() bool

func (NativeByteArray) IsOptimized

func (a NativeByteArray) IsOptimized() bool

func (NativeByteArray) Len

func (a NativeByteArray) Len() int

func (NativeByteArray) Less

func (a NativeByteArray) Less(i, j int) bool

func (NativeByteArray) MatchBetween

func (a NativeByteArray) MatchBetween(from, to []byte, bits, mask *vec.Bitset) *vec.Bitset

func (NativeByteArray) MatchEqual

func (a NativeByteArray) MatchEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (NativeByteArray) MatchGreaterThan

func (a NativeByteArray) MatchGreaterThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (NativeByteArray) MatchGreaterThanEqual

func (a NativeByteArray) MatchGreaterThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (NativeByteArray) MatchLessThan

func (a NativeByteArray) MatchLessThan(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (NativeByteArray) MatchLessThanEqual

func (a NativeByteArray) MatchLessThanEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (NativeByteArray) MatchNotEqual

func (a NativeByteArray) MatchNotEqual(val []byte, bits, mask *vec.Bitset) *vec.Bitset

func (*NativeByteArray) Materialize

func (a *NativeByteArray) Materialize() ByteArray

func (NativeByteArray) MaxEncodedSize

func (a NativeByteArray) MaxEncodedSize() int

func (NativeByteArray) MinMax

func (a NativeByteArray) MinMax() ([]byte, []byte)

func (*NativeByteArray) Optimize

func (a *NativeByteArray) Optimize() ByteArray

func (*NativeByteArray) Release

func (a *NativeByteArray) Release()

func (*NativeByteArray) Set

func (a *NativeByteArray) Set(index int, buf []byte)

func (*NativeByteArray) SetZeroCopy

func (a *NativeByteArray) SetZeroCopy(index int, buf []byte)

func (NativeByteArray) Slice

func (a NativeByteArray) Slice() [][]byte

func (NativeByteArray) Subslice

func (a NativeByteArray) Subslice(start, end int) [][]byte

func (NativeByteArray) Swap

func (a NativeByteArray) Swap(i, j int)

func (NativeByteArray) WriteTo

func (a NativeByteArray) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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