MCPcopy Create free account
hub / github.com/brimdata/super / End

Method End

vector/record.go:123–139  ·  view source on GitHub ↗
(off uint32)

Source from the content-addressed store, hash-verified

121}
122
123func (r *RLE) End(off uint32) []uint32 {
124 if r.prediction == r.last {
125 // all nones
126 r.emit(off)
127 } else if r.prediction == off {
128 if len(r.runs) == 1 && r.runs[0] == 0 {
129 // all values
130 return nil
131 }
132 // write the last run of values
133 r.emit(off - r.last)
134 } else {
135 // write the last run of values and the last run of nones
136 r.Touch(off)
137 }
138 return r.runs
139}
140
141func (r *RLE) emit(run uint32) {
142 r.runs = append(r.runs, run)

Callers 1

RLEMethod · 0.95

Calls 2

emitMethod · 0.95
TouchMethod · 0.95

Tested by

no test coverage detected