EncodeDecimalAscending returns the resulting byte slice with the encoded decimal appended to the given buffer. Values are classified as large, medium, or small according to the value of E. If E is 11 or more, the value is large. For E between 0 and 10, the value is medium. For E less than zero, the
(appendTo []byte, d *apd.Decimal)
| 43 | // consist of the single byte 0x1a followed by a descending varint encoding of |
| 44 | // E followed by the ones-complement of M. |
| 45 | func EncodeDecimalAscending(appendTo []byte, d *apd.Decimal) []byte { |
| 46 | return encodeDecimal(appendTo, d, false) |
| 47 | } |
| 48 | |
| 49 | // EncodeDecimalDescending is the descending version of EncodeDecimalAscending. |
| 50 | func EncodeDecimalDescending(appendTo []byte, d *apd.Decimal) []byte { |
no test coverage detected
searching dependent graphs…