Versions in this module Expand all Collapse all v1 v1.0.1 Sep 20, 2026 v1.0.0 Sep 16, 2026 Changes in this version + func Hash64Bytes(b []byte) uint64 + func Hash64String(s string) uint64 + func OptimalBloomFilterSize(numKeys int64, falsePositiveRate float64) (uint64, uint8) + type Array struct + func NewStack[T any]() *Array[T] + func (s *Array[T]) IsEmpty() bool + func (s *Array[T]) Length() int + func (s *Array[T]) Peek() T + func (s *Array[T]) Pop() T + func (s *Array[T]) Push(value T) + type BitSet struct + Bits []uint64 + Size uint64 + func NewBitSet(size uint64) *BitSet + func (b *BitSet) ClearAll() + func (bs *BitSet) AllSet() bool + func (bs *BitSet) AnySet() bool + func (bs *BitSet) Clear(pos uint64) error + func (bs *BitSet) CountSetBits() uint64 + func (bs *BitSet) GetSize() uint64 + func (bs *BitSet) IsSet(pos uint64) (bool, error) + func (bs *BitSet) NoneSet() bool + func (bs *BitSet) Set(pos uint64) error + func (bs *BitSet) String() string + func (bs *BitSet) Toggle(pos uint64) error + type BloomFilter struct + Bitset *BitSet + HashCount uint8 + Size uint64 + func NewBloomFilter(size uint64, hashCount uint8) *BloomFilter + func NewBloomFilterWithPositiveRate(size uint64, rate float64) *BloomFilter + func (bf *BloomFilter) Add(key string) + func (bf *BloomFilter) ClearAll() + func (bf *BloomFilter) Deserialize(data []byte) error + func (bf *BloomFilter) Exists(key string) bool + func (bf *BloomFilter) Hash(key string, seed uint64) uint64 + func (bf *BloomFilter) MemoryUsage() uint64 + func (bf *BloomFilter) Merge(other *BloomFilter) error + func (bf *BloomFilter) Serialize() ([]byte, error) + type ConcurrentMap struct + Data map[string]string + Id string + func (dict *ConcurrentMap) Add(key string, value string) + func (dict *ConcurrentMap) Clear() + func (dict *ConcurrentMap) Exist(key string) bool + func (dict *ConcurrentMap) Get(key string) string + func (dict *ConcurrentMap) GetKeys() []string + func (dict *ConcurrentMap) GetValues() []string + func (dict *ConcurrentMap) Remove(key string) bool + func (dict *ConcurrentMap) Size() int + type CountMinSketch struct + func NewCountMinSketch(depth int, width uint64, agingEvery uint64) (*CountMinSketch, error) + func (c *CountMinSketch) Age() + func (c *CountMinSketch) Estimate(h uint64) uint32 + func (c *CountMinSketch) Increment(h uint64) + func (c *CountMinSketch) Reset() + type Hasher func(K) uint64 + type LRU struct + func NewLRU[K comparable, V any](capacity int, onEvict OnEvict[K, V]) *LRU[K, V] + func (c *LRU[K, V]) Capacity() int + func (c *LRU[K, V]) Delete(key K) bool + func (c *LRU[K, V]) Get(key K) (v V, ok bool) + func (c *LRU[K, V]) Keys() []K + func (c *LRU[K, V]) Len() int + func (c *LRU[K, V]) Peek(key K) (v V, ok bool) + func (c *LRU[K, V]) Purge() + func (c *LRU[K, V]) Set(key K, value V) (evicted bool) + func (c *LRU[K, V]) TailKey() (K, bool) + type LinkedList struct + Head *Node[T] + func NewLinkedList[T any]() *LinkedList[T] + func (ll *LinkedList[T]) AddAtBeg(val T) + func (ll *LinkedList[T]) AddAtEnd(val T) + func (ll *LinkedList[T]) CheckRangeFromIndex(left, right int) error + func (ll *LinkedList[T]) Count() int + func (ll *LinkedList[T]) DelAtBeg() (T, bool) + func (ll *LinkedList[T]) DelAtEnd() (T, bool) + func (ll *LinkedList[T]) DelByPos(pos int) (T, bool) + func (ll *LinkedList[T]) Display() + func (ll *LinkedList[T]) Reverse() + func (ll *LinkedList[T]) ReversePartition(left, right int) error + type Node struct + Next *Node[T] + Prev *Node[T] + Val T + func NewLinkedListNode[T any](val T) *Node[T] + type OnEvict func(key K, value V) + type SafeLRU struct + func NewSafeLRU[K comparable, V any](core *LRU[K, V]) *SafeLRU[K, V] + func (s *SafeLRU[K, V]) Capacity() int + func (s *SafeLRU[K, V]) Delete(k K) bool + func (s *SafeLRU[K, V]) Get(k K) (V, bool) + func (s *SafeLRU[K, V]) Keys() []K + func (s *SafeLRU[K, V]) Len() int + func (s *SafeLRU[K, V]) Peek(k K) (V, bool) + func (s *SafeLRU[K, V]) Purge() + func (s *SafeLRU[K, V]) Set(k K, v V) bool + type TinyLFU struct + func NewTinyLFUWithOptions[K any](opt TinyLFUOptions[K]) (*TinyLFU[K], error) + func NewTinyLFU[K any](depth int, width uint64, agingEvery uint64, hash Hasher[K]) (*TinyLFU[K], error) + func (t *TinyLFU[K]) Age() + func (t *TinyLFU[K]) Estimate(key K) uint32 + func (t *TinyLFU[K]) Record(key K) + func (t *TinyLFU[K]) RecordN(key K, n uint32) + func (t *TinyLFU[K]) Reset() + func (t *TinyLFU[K]) ShouldAdmit(incoming, victim K) bool + func (t *TinyLFU[K]) ShouldAdmitAgainst(incoming K, victimFreq uint32) bool + func (t *TinyLFU[K]) VictimFreq(victim K) uint32 + type TinyLFUOptions struct + AdmitOnEqual bool + AgingEvery uint64 + Depth int + Hash Hasher[K] + Width uint64