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)
| 763 | // no need to introduce DecodeBytesDescendingDeepCopy to mirror |
| 764 | // DecodeBytesAscendingDeepCopy. |
| 765 | func 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 |
no test coverage detected
searching dependent graphs…