dlug

package
v0.0.0-...-d92f75b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2016 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

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 Check

func Check(d []byte) bool

func CheckCode

func CheckCode(d []byte) int

func Cmp

func Cmp(b0, b1 []byte) int32

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 ConvertByte(b []byte) (byte, int)

func ConvertUint32

func ConvertUint32(b []byte) (uint32, int)

func ConvertUint64

func ConvertUint64(b []byte) (uint64, int)

func EqualByte

func EqualByte(d []byte, b byte) bool

func FillSliceByte

func FillSliceByte(s []byte, b byte) int

func FillSliceUint32

func FillSliceUint32(s []byte, u uint32) int

func FillSliceUint64

func FillSliceUint64(s []byte, u uint64) int

func GetByteLen

func GetByteLen(d []byte) int

func GetDataBitLen

func GetDataBitLen(d []byte) int

func GetDlugIndex

func GetDlugIndex(d []byte) int

func GetPrefixBitLen

func GetPrefixBitLen(d []byte) int

func MarshalByte

func MarshalByte(b byte) []byte

func MarshalUint32

func MarshalUint32(u uint32) []byte

func MarshalUint64

func MarshalUint64(u uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL