YTSFlix_Go/vendor/github.com/anacrolix/missinggo/bitmap/global.go
2018-11-04 15:58:15 +01:00

16 lines
287 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 int) Bitmap {
return Bitmap{
rb: roaring.FlipInt(bm.lazyRB(), start, end),
}
}