MCPcopy Create free account
hub / github.com/dgraph-io/dgraph-benchmarks / NewDecoder

Function NewDecoder

bitmap/codec.go:169–175  ·  view source on GitHub ↗

NewDecoder returns a decoder for the given UidPack and properly initializes it.

(pack *UidPack)

Source from the content-addressed store, hash-verified

167
168// NewDecoder returns a decoder for the given UidPack and properly initializes it.
169func NewDecoder(pack *UidPack) *Decoder {
170 decoder := &Decoder{
171 Pack: pack,
172 }
173 decoder.Seek(0, SeekStart)
174 return decoder
175}
176
177func (d *Decoder) UnpackBlock() []uint64 {
178 if len(d.uids) > 0 {

Callers 1

BenchmarkContainsFunction · 0.85

Calls 1

SeekMethod · 0.95

Tested by 1

BenchmarkContainsFunction · 0.68