encodeNonsortingDecimalValue encodes the absolute value of a decimal's exponent and slice of digit bytes into buf, returning the populated buffer after encoding. The function first encodes the absolute value of a decimal's exponent as an unsigned varint. Following this, it copies the decimal's big-e
(exp uint64, digits []big.Word, buf []byte)
| 613 | // decimal's exponent as an unsigned varint. Following this, it copies the |
| 614 | // decimal's big-endian digits themselves into the buffer. |
| 615 | func encodeNonsortingDecimalValue(exp uint64, digits []big.Word, buf []byte) []byte { |
| 616 | // Encode the exponent using a Uvarint. |
| 617 | buf = EncodeUvarintAscending(buf, exp) |
| 618 | |
| 619 | // Encode the digits into the end of the byte slice. |
| 620 | return copyWords(buf, digits) |
| 621 | } |
| 622 | |
| 623 | func encodeNonsortingDecimalValueWithoutExp(digits []big.Word, buf []byte) []byte { |
| 624 | // Encode the digits into the end of the byte slice. |
no test coverage detected