github.com/segmentio/parquet-go@v0.0.0-20230712180008-5d42db8f0d47/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  }