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)
| 599 | // decimal's exponent as an unsigned varint. Following this, it copies the |
| 600 | // decimal's big-endian digits themselves into the buffer. |
| 601 | func encodeNonsortingDecimalValue(exp uint64, digits []big.Word, buf []byte) []byte { |
| 602 | // Encode the exponent using a Uvarint. |
| 603 | buf = EncodeUvarintAscending(buf, exp) |
| 604 | |
| 605 | // Encode the digits into the end of the byte slice. |
| 606 | return copyWords(buf, digits) |
| 607 | } |
| 608 | |
| 609 | func encodeNonsortingDecimalValueWithoutExp(digits []big.Word, buf []byte) []byte { |
| 610 | // Encode the digits into the end of the byte slice. |
no test coverage detected
searching dependent graphs…