LinearSeek returns uids of the last block whose base is less than seek. If there are no such blocks i.e. seek < base of first block, it returns uids of first block. LinearSeek is used to get closest uids which are >= seek.
(seek uint64)
| 347 | // If there are no such blocks i.e. seek < base of first block, it returns uids of first |
| 348 | // block. LinearSeek is used to get closest uids which are >= seek. |
| 349 | func (d *Decoder) LinearSeek(seek uint64) []uint64 { |
| 350 | for { |
| 351 | v := d.PeekNextBase() |
| 352 | if seek < v { |
| 353 | break |
| 354 | } |
| 355 | d.blockIdx++ |
| 356 | } |
| 357 | |
| 358 | return d.UnpackBlock() |
| 359 | } |
| 360 | |
| 361 | // PeekNextBase returns the base of the next block without advancing the decoder. |
| 362 | func (d *Decoder) PeekNextBase() uint64 { |