arrow: github.com/apache/arrow/go/arrow/bitutil Index | Files

package bitutil

import "github.com/apache/arrow/go/arrow/bitutil"

Index

Package Files

bitutil.go

Variables

var (
    BitMask        = [8]byte{1, 2, 4, 8, 16, 32, 64, 128}
    FlippedBitMask = [8]byte{254, 253, 251, 247, 239, 223, 191, 127}
)

func BitIsNotSet Uses

func BitIsNotSet(buf []byte, i int) bool

BitIsNotSet returns true if the bit at index i in buf is not set (0).

func BitIsSet Uses

func BitIsSet(buf []byte, i int) bool

BitIsSet returns true if the bit at index i in buf is set (1).

func BytesForBits Uses

func BytesForBits(bits int64) int64

func CeilByte Uses

func CeilByte(size int) int

CeilByte rounds size to the next multiple of 8.

func CeilByte64 Uses

func CeilByte64(size int64) int64

CeilByte64 rounds size to the next multiple of 8.

func ClearBit Uses

func ClearBit(buf []byte, i int)

ClearBit sets the bit at index i in buf to 0.

func CountSetBits Uses

func CountSetBits(buf []byte, offset, n int) int

CountSetBits counts the number of 1's in buf up to n bits.

func IsMultipleOf8 Uses

func IsMultipleOf8(v int64) bool

IsMultipleOf8 returns whether v is a multiple of 8.

func NextPowerOf2 Uses

func NextPowerOf2(x int) int

NextPowerOf2 rounds x to the next power of two.

func SetBit Uses

func SetBit(buf []byte, i int)

SetBit sets the bit at index i in buf to 1.

func SetBitTo Uses

func SetBitTo(buf []byte, i int, val bool)

SetBitTo sets the bit at index i in buf to val.

Package bitutil imports 3 packages (graph) and is imported by 6 packages. Updated 2019-10-12. Refresh now. Tools for package owners.