MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / getBits

Method getBits

structure/bitmap.go:322–330  ·  view source on GitHub ↗

getBits function retrieves the bits for the provided key

(key []byte)

Source from the content-addressed store, hash-verified

320
321// getBits function retrieves the bits for the provided key
322func (b *BitmapStructure) getBits(key []byte) ([]byte, error) {
323 // Get the bits from the database
324 value, err := b.db.Get(key)
325 if err != nil {
326 return nil, err
327 }
328 // Return the retrieved bits
329 return value, nil
330}
331
332// bitsetToByteArray function converts a bitset to a byte array
333func bitsetToByteArray(set *bitset.BitSet) ([]byte, error) {

Callers 3

SetBitMethod · 0.95
SetBitsMethod · 0.95

Calls 1

GetMethod · 0.65

Tested by 1