MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeBytesDescending

Function DecodeBytesDescending

pkg/util/encoding/encoding.go:765–771  ·  view source on GitHub ↗

DecodeBytesDescending decodes a []byte value from the input buffer which was encoded using EncodeBytesDescending. The decoded bytes are appended to r. The remainder of the input buffer and the decoded []byte are returned. Note that this method internally will always perform a deep copy, so there is

(b []byte, r []byte)

Source from the content-addressed store, hash-verified

763// no need to introduce DecodeBytesDescendingDeepCopy to mirror
764// DecodeBytesAscendingDeepCopy.
765func DecodeBytesDescending(b []byte, r []byte) ([]byte, []byte, error) {
766 // Ask for the deep copy to make sure we never get back a sub-slice of `b`,
767 // since we're going to modify the contents of the slice.
768 b, r, err := decodeBytesInternal(b, r, descendingBytesEscapes, true /* expectMarker */, true /* deepCopy */)
769 onesComplement(r)
770 return b, r, err
771}
772
773// decodeBytesInternal decodes an encoded []byte value from b and appends it to
774// r. The remainder of b and the decoded []byte are returned. If deepCopy is

Callers 1

Calls 2

decodeBytesInternalFunction · 0.85
onesComplementFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…