mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* Upgrade parquet-go to latest for StructTag option * Upgrade parquet-go to get latest alloc fix
15 lines
447 B
Go
15 lines
447 B
Go
// Package bitpack implements efficient bit packing and unpacking routines for
|
|
// integers of various bit widths.
|
|
package bitpack
|
|
|
|
// Int is a type constraint representing the integer types that this package
|
|
// supports.
|
|
type Int interface {
|
|
~int32 | ~uint32 | ~int64 | ~uint64 | ~int | ~uintptr
|
|
}
|
|
|
|
// ByteCount returns the number of bytes needed to hold the given bit count.
|
|
func ByteCount(bitCount uint) int {
|
|
return int((bitCount + 7) / 8)
|
|
}
|