getBits function retrieves the bits for the provided key
(key []byte)
| 320 | |
| 321 | // getBits function retrieves the bits for the provided key |
| 322 | func (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 |
| 333 | func bitsetToByteArray(set *bitset.BitSet) ([]byte, error) { |