e3: simplify history reader (#846)

This commit is contained in:
Alex Sharov 2023-01-22 16:42:13 +07:00 committed by GitHub
parent 504763fe8e
commit 559e60f1a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,3 +420,10 @@ func Bytesmask(fixedbits int) (fixedbytes int, mask byte) {
type ToBitmap interface {
ToBitmap() (*roaring64.Bitmap, error)
}
func ToIter(it roaring64.IntIterable64) *ToIterInterface { return &ToIterInterface{it: it} }
type ToIterInterface struct{ it roaring64.IntIterable64 }
func (i *ToIterInterface) HasNext() bool { return i.it.HasNext() }
func (i *ToIterInterface) Next() (uint64, error) { return i.it.Next(), nil }