Documentation ¶
Overview ¶
Package bmap implements basic map with []byte key type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BMap ¶
type BMap[T any] struct { // contains filtered or unexported fields }
BMap implements generic hashmap with []byte key type. It is intended to store a small fixed set of keys and it has some limitations: keys cannot be deleted, number of keys cannot exceed defined limit. Added keys are copied into internal byte slice for safety. Implementation is intended to be as simple (and bug-free) as possible. Uses custom implementation of hashmap, collisions are resolved by chaining.
func New ¶
New create bytes map. size defines maximum number of stored keys (not counting empty key).
Click to show internal directories.
Click to hide internal directories.