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

Method setBitmapToDB

structure/bitmap_1.go:378–386  ·  view source on GitHub ↗

setBitmapToDB stores the data into the database.

(key string, bm []byte, length uint)

Source from the content-addressed store, hash-verified

376
377// setBitmapToDB stores the data into the database.
378func (b *BitMapStructure) setBitmapToDB(key string, bm []byte, length uint) error {
379 // Serialize into a binary array
380 encValue, err := b.encodeBitmap(bm, length)
381 if err != nil {
382 return err
383 }
384 // Store in the database
385 return b.db.Put([]byte(key), encValue)
386}
387
388// encodeBitmap encodes the value
389// format: [type][length][value]

Callers 5

SetBitMethod · 0.95
SetBitsMethod · 0.95
BitOpMethod · 0.95
BitDelMethod · 0.95
BitDelsMethod · 0.95

Calls 2

encodeBitmapMethod · 0.95
PutMethod · 0.65

Tested by

no test coverage detected