nazabits

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 0 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBit16 added in v0.10.0

func GetBit16(v []byte, pos int) int

func GetBit8

func GetBit8(v uint8, pos int) int

@param pos: 取值范围 [0, 7],0表示最低位

func GetBits16 added in v0.10.0

func GetBits16(v []byte, pos int, n int) int

func GetBits8

func GetBits8(v uint8, pos int, n int) int

@param pos: 取值范围 [0, 7],0表示最低位 @param n: 取多少位, 取值范围 [1, 8]

举例,GetBits8(105, 2, 4) = 10(即1010)

v: 0110 1001

pos: 2

n:   .. ..

Types

This section is empty.

Jump to

Keyboard shortcuts

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