func (di *DecompressIterator) HasNext() bool {
	if di.d.t == 0 {
		di.t, di.v, di.err = di.d.decompressFirst()
	} else {
		di.t, di.v, di.err = di.d.decompress()
	}
	return di.err == nil
}
HasNext proceeds decompressing time-series data unitil EOF.
package gorilla
import (
	"errors"
	"fmt"
	"io"
	"math"
)
type Decompressor struct {
	br            *bitReader
	header        uint32
	t             uint32
	delta         uint32
	leadingZeros  uint8
	trailingZeros uint8
	value         uint64
}
func NewDecompressor(r io.Reader) (d *Decompressor, header uint32, err error) {
	d = &Decompressor{
		br: newBitReader(r),
	}
	h, err := d.br.readBits(32)
	if err != nil {
		return nil, 0, fmt.Errorf("failed to decode header: %w", err)
	}
	d.header = uint32(h)
	return d, d.header, nil
}
func (d *Decompressor) Iterator() *DecompressIterator {
	return &DecompressIterator{0, 0, nil, d}
}
type DecompressIterator struct {
	t   uint32
	v   float64
	err error
	d   *Decompressor
}
func (di *DecompressIterator) Next() (t uint32, v float64) {
	return di.t, di.v
}
func (di *DecompressIterator) Err() error {
	if errors.Is(di.err, io.EOF) {
		return nil
	}
	return di.err
}