mirror of
https://github.com/status-im/status-go.git
synced 2025-01-11 15:14:52 +00:00
16 lines
289 B
Go
16 lines
289 B
Go
package bitmap
|
|
|
|
import "github.com/RoaringBitmap/roaring"
|
|
|
|
func Sub(left, right Bitmap) Bitmap {
|
|
return Bitmap{
|
|
RB: roaring.AndNot(left.lazyRB(), right.lazyRB()),
|
|
}
|
|
}
|
|
|
|
func Flip(bm Bitmap, start, end BitRange) Bitmap {
|
|
return Bitmap{
|
|
RB: roaring.Flip(bm.lazyRB(), start, end),
|
|
}
|
|
}
|