Documentation ¶
Index ¶
- Variables
- func Check(d []byte) bool
- func CheckCode(d []byte) int
- func Cmp(b0, b1 []byte) int32
- func ConvertByte(b []byte) (byte, int)
- func ConvertUint32(b []byte) (uint32, int)
- func ConvertUint64(b []byte) (uint64, int)
- func EqualByte(d []byte, b byte) bool
- func FillSliceByte(s []byte, b byte) int
- func FillSliceUint32(s []byte, u uint32) int
- func FillSliceUint64(s []byte, u uint64) int
- func GetByteLen(d []byte) int
- func GetDataBitLen(d []byte) int
- func GetDlugIndex(d []byte) int
- func GetPrefixBitLen(d []byte) int
- func MarshalByte(b byte) []byte
- func MarshalUint32(u uint32) []byte
- func MarshalUint64(u uint64) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var BitLen []uint = []uint{7, 14, 21, 27, 35, 43, 56, 64, 128}
View Source
var ByteLen []int = []int{1, 2, 3, 4, 5, 6, 8, 9, 17}
0,1,2,3,4,5,6,7,8
View Source
var Pfx []byte = []byte{0, 0x80, 0xc0, 0xe0, 0xe8, 0xf0, 0xf8, 0xf9, 0xfa, 0xff}
View Source
var PfxBitLen []int = []int{1, 2, 3, 5, 5, 5, 8, 8, 8}
Functions ¶
func Cmp ¶
If the byte vectors are equal, we can compare on a byte by byte level. If they're not, we calculate the first non-zero position and compare each byte array from the appropriate position.
func ConvertByte ¶
func ConvertUint32 ¶
func ConvertUint64 ¶
func FillSliceByte ¶
func FillSliceUint32 ¶
func FillSliceUint64 ¶
func GetByteLen ¶
func GetDataBitLen ¶
func GetDlugIndex ¶
func GetPrefixBitLen ¶
func MarshalByte ¶
func MarshalUint32 ¶
func MarshalUint64 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.