{"modulePath":"github.com/flyteorg/flyte/flytestdlib","version":"v1.16.8","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package bitarray\n\nContains efficient array that stores small-range values (up to uint64) in a bit array to optimize storage.\n\n## Types\n\n```go\ntype BitSet []Block\n```\nBitSet is a set of bits that can be set, cleared and queried.\n\n```go\nfunc NewBitSet(desiredCap uint) *BitSet\n```\nInitializes a new BitSet of the specified size.\n\n```go\nfunc (s *BitSet) BlockCount() int\n```\nReturns the number of blocks of the BitSet.\n\n```go\nfunc (s *BitSet) Cap() uint\n```\nReturns the length of the BitSet.\n\n```go\nfunc (s *BitSet) Clear(i uint)\n```\nEnsures that the given bit is cleared (unset) in the BitSet.\n\n```go\nfunc (s BitSet) DeepCopy() BitSet\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BitSet.\n\n```go\nfunc (s BitSet) DeepCopyInto(out *BitSet)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (s *BitSet) IsSet(i uint) bool\n```\nReturns true if the given bit is set, false if it is cleared.\n\n```go\nfunc (s *BitSet) Set(i uint)\n```\nEnsures that the given bit is set in the BitSet.\n\n```go\ntype Block uint32\n```\n\n```go\ntype CompactArray struct {\n\t*BitSet    `json:\",inline\"`\n\tItemSize   uint `json:\"item,omitempty\"`\n\tItemsCount uint `json:\"count,omitempty\"`\n}\n```\nProvides a wrapper on top of BitSet to store items of arbitrary size (up to 64 bits each) efficiently.\n\n```go\nfunc NewCompactArray(size uint, maxValue Item) (CompactArray, error)\n```\nCreates a new CompactArray of specified size.\n\n```go\nfunc (a *CompactArray) DeepCopy() *CompactArray\n```\nDeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompactArray.\n\n```go\nfunc (a *CompactArray) DeepCopyInto(out *CompactArray)\n```\nDeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n\n```go\nfunc (a *CompactArray) GetItem(index int) Item\n```\nGets Item at provided index.\n\n```go\nfunc (a CompactArray) GetItems() []Item\n```\nGets all items stored in the array. The size of the returned array matches the ItemsCount it was initialized with.\n\n```go\nfunc (a *CompactArray) SetItem(index int, value Item)\n```\nSets item at index to provided value.\n\n```go\nfunc (a CompactArray) String() string\n```\nGets a string representation of the array contents. This is a relatively expensive operation.\n\n```go\ntype Item = uint64\n```\nThe biggest Item size that can fit in CompactArray.\n\n","path":"github.com/flyteorg/flyte/flytestdlib/bitarray","name":"bitarray","synopsis":"Contains efficient array that stores small-range values (up to uint64) in a bit array to optimize storage.","isRedistributable":true}
