wp
This commit is contained in:
@@ -198,21 +198,21 @@ func (s *ValueDeltaCompressor) StoredSize() int {
|
||||
// }
|
||||
// }
|
||||
|
||||
func (s *ValueDeltaCompressor) WritePayloadTo(w io.Writer, state *qb.ValueDeltaCapturedState) (err error) {
|
||||
if state == nil {
|
||||
func (s *ValueDeltaCompressor) WriteStoredTo(w io.Writer) (err error) {
|
||||
if s.state == nil {
|
||||
_, err = w.Write(s.buf[:s.pos])
|
||||
return
|
||||
} else {
|
||||
_, err = w.Write(state.Payload)
|
||||
_, err = w.Write(s.state.Payload)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = bin.WriteVarUint64(w, state.LastDelta)
|
||||
_, err = bin.WriteVarUint64(w, s.state.LastDelta)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = w.Write([]byte{
|
||||
state.H,
|
||||
s.state.H,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user