Documentation
¶
Index ¶
- Variables
- func ClampInt(min, max, v int) int
- func ClampInt64(min, max, v int64) int64
- func DigitsInBase(n int64, basePrefix bool, base int) int
- func MaxInt(a, b int) int
- func MaxInt64(a, b int64) int64
- func MaxUInt64(a, b uint64) uint64
- func MinInt(a, b int) int
- func MinInt64(a, b int64) int64
- func MinUInt64(a, b uint64) uint64
- func PadFormatInt(i int64, base int, basePrefix bool, width int) string
- func PadFormatUint(i uint64, base int, basePrefix bool, width int) string
- func TwosComplement(nBits int, n uint64) int64
- func ZigZag(n uint64) int64
- type BitRange
- type Bits
Constants ¶
This section is empty.
Variables ¶
View Source
var BasePrefixMap = map[int]string{
2: "0b",
8: "0o",
16: "0x",
}
Functions ¶
func ClampInt64 ¶
func TwosComplement ¶
func ZigZag ¶
decode zigzag encoded integer https://developers.google.com/protocol-buffers/docs/encoding
Types ¶
type BitRange ¶
func (BitRange) StringByteBits ¶
Click to show internal directories.
Click to hide internal directories.