package
module
Version:
v0.0.0-...-4f1e2a0
Opens a new window with list of versions in this module.
Published: Jan 18, 2019
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
bits
A very simple helpers to manipulate bits in go, you can just copy the file.
- Extract specific bit in a byte
- Create a byte mask of contiguos bits for specific range
- Extract a number represented in a range of bits
Documentation
¶
func CreateByteMask(start, end uint8) (r byte)
CreateByteMask creates mask of consecutive bits from start to end index.
GetBit extracts a specific bit in a byte.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.