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)
| 565 | // are appended to r. The remainder of the input buffer and the |
| 566 | // decoded []byte are returned. |
| 567 | func 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 | |
| 578 | func decodeBytesInternal(b []byte, r []byte, e escapes, expectMarker bool) ([]byte, []byte, error) { |
| 579 | if expectMarker { |
no test coverage detected
searching dependent graphs…