YTSFlix_Go/vendor/github.com/anacrolix/missinggo/bitmap/global.go

16 lines
287 B
Go
Raw Normal View History

2018-11-04 14:58:15 +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 int) Bitmap {
return Bitmap{
rb: roaring.FlipInt(bm.lazyRB(), start, end),
}
}