status-go/vendor/github.com/anacrolix/missinggo/v2/bitmap/global.go

16 lines
289 B
Go
Raw Normal View History

2022-03-10 09:44:48 +00:00
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),
}
}