github.com/parquet-go/parquet-go@v0.20.0/internal/bitpack/bitpack.go (about)

     1  // Package bitpack implements efficient bit packing and unpacking routines for
     2  // integers of various bit widths.
     3  package bitpack
     4  
     5  // ByteCount returns the number of bytes needed to hold the given bit count.
     6  func ByteCount(bitCount uint) int {
     7  	return int((bitCount + 7) / 8)
     8  }