DecodeUint64Ascending decodes a uint64 from the input buffer, treating the input as a big-endian 8 byte uint64 representation. The remainder of the input buffer and the decoded uint64 are returned.
(b []byte)
| 276 | // the input as a big-endian 8 byte uint64 representation. The remainder |
| 277 | // of the input buffer and the decoded uint64 are returned. |
| 278 | func DecodeUint64Ascending(b []byte) ([]byte, uint64, error) { |
| 279 | if len(b) < 8 { |
| 280 | return nil, 0, errors.Errorf("insufficient bytes to decode uint64 int value") |
| 281 | } |
| 282 | v := binary.BigEndian.Uint64(b) |
| 283 | return b[8:], v, nil |
| 284 | } |
| 285 | |
| 286 | // DecodeUint64Descending decodes a uint64 value which was encoded |
| 287 | // using EncodeUint64Descending. |
no test coverage detected
searching dependent graphs…