Line data Source code
1 : // Copyright 2018 The LevelDB-Go and Pebble Authors. All rights reserved. Use 2 : // of this source code is governed by a BSD-style license that can be found in 3 : // the LICENSE file. 4 : 5 : package main 6 : 7 0 : func encodeUint32Ascending(b []byte, v uint32) []byte { 8 0 : return append(b, byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) 9 0 : } 10 : 11 0 : func encodeUint64Ascending(b []byte, v uint64) []byte { 12 0 : return append(b, 13 0 : byte(v>>56), byte(v>>48), byte(v>>40), byte(v>>32), 14 0 : byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) 15 0 : }