byteorder.mx raw

   1  // Copyright 2024 The Go Authors. All rights reserved.
   2  // Use of this source code is governed by a BSD-style
   3  // license that can be found in the LICENSE file.
   4  
   5  package byteorder
   6  
   7  import (
   8  	"internal/byteorder"
   9  )
  10  
  11  func LEUint16(b []byte) uint16 {
  12  	return byteorder.LEUint16(b)
  13  }
  14  
  15  func BEUint32(b []byte) uint32 {
  16  	return byteorder.BEUint32(b)
  17  }
  18  
  19  func BEUint64(b []byte) uint64 {
  20  	return byteorder.BEUint64(b)
  21  }
  22  
  23  func LEUint64(b []byte) uint64 {
  24  	return byteorder.LEUint64(b)
  25  }
  26  
  27  func BEPutUint16(b []byte, v uint16) {
  28  	byteorder.BEPutUint16(b, v)
  29  }
  30  
  31  func BEPutUint32(b []byte, v uint32) {
  32  	byteorder.BEPutUint32(b, v)
  33  }
  34  
  35  func BEPutUint64(b []byte, v uint64) {
  36  	byteorder.BEPutUint64(b, v)
  37  }
  38  
  39  func LEPutUint64(b []byte, v uint64) {
  40  	byteorder.LEPutUint64(b, v)
  41  }
  42  
  43  func BEAppendUint16(b []byte, v uint16) []byte {
  44  	return byteorder.BEAppendUint16(b, v)
  45  }
  46  
  47  func BEAppendUint32(b []byte, v uint32) []byte {
  48  	return byteorder.BEAppendUint32(b, v)
  49  }
  50  
  51  func BEAppendUint64(b []byte, v uint64) []byte {
  52  	return byteorder.BEAppendUint64(b, v)
  53  }
  54