MCPcopy Index your code
hub / github.com/ByteStorage/FlyDB / NewBitmap

Function NewBitmap

structure/bitmap.go:40–48  ·  view source on GitHub ↗

NewBitmap function initializes a new BitmapStructure with the provided options

(options config.Options)

Source from the content-addressed store, hash-verified

38
39// NewBitmap function initializes a new BitmapStructure with the provided options
40func NewBitmap(options config.Options) (*BitmapStructure, error) {
41 // Create a new database with the provided options
42 db, err := engine.NewDB(options)
43 if err != nil {
44 return nil, err
45 }
46 // Return a new BitmapStructure with the created database
47 return &BitmapStructure{db: db}, nil
48}
49
50// SetBit function sets a bit at the specified offset in the bitmap for the provided key
51func (b *BitmapStructure) SetBit(k string, off uint) error {

Callers 1

initBitmapFunction · 0.85

Calls 1

NewDBFunction · 0.92

Tested by 1

initBitmapFunction · 0.68