github.com/vc42/parquet-go@v0.0.0-20240320194221-1a9adb5f23f5/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 }