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

Function DecodeBytesDescending

pkg/util/encoding/encoding.go:567–576  ·  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.

(b []byte, r []byte)

Source from the content-addressed store, hash-verified

565// are appended to r. The remainder of the input buffer and the
566// decoded []byte are returned.
567func DecodeBytesDescending(b []byte, r []byte) ([]byte, []byte, error) {
568 // Always pass an `r` to make sure we never get back a sub-slice of `b`,
569 // since we're going to modify the contents of the slice.
570 if r == nil {
571 r = []byte{}
572 }
573 b, r, err := decodeBytesInternal(b, r, descendingEscapes, true)
574 onesComplement(r)
575 return b, r, err
576}
577
578func decodeBytesInternal(b []byte, r []byte, e escapes, expectMarker bool) ([]byte, []byte, error) {
579 if expectMarker {

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…