MCPcopy Index your code
hub / github.com/dgraph-io/dgraph-benchmarks / Decode

Function Decode

bitmap/codec.go:409–417  ·  view source on GitHub ↗

Decode decodes the UidPack back into the list of uids. This is a stop-gap function, Decode would need to do more specific things than just return the list back.

(pack *UidPack, seek uint64)

Source from the content-addressed store, hash-verified

407// Decode decodes the UidPack back into the list of uids. This is a stop-gap function, Decode would
408// need to do more specific things than just return the list back.
409func Decode(pack *UidPack, seek uint64) []uint64 {
410 out := make([]uint64, 0, ApproxLen(pack))
411 dec := Decoder{Pack: pack}
412
413 for uids := dec.Seek(seek, SeekStart); len(uids) > 0; uids = dec.Next() {
414 out = append(out, uids...)
415 }
416 return out
417}
418
419// DecodeToBuffer is the same as Decode but it returns a z.Buffer which is
420// calloc'ed and can be SHOULD be freed up by calling buffer.Release().

Callers

nothing calls this directly

Calls 3

SeekMethod · 0.95
NextMethod · 0.95
ApproxLenFunction · 0.85

Tested by

no test coverage detected