int calculateByteSize(int bitCount) { return ((bitCount + (byteSize * 8) - 1) ~/ (byteSize * 8)) * byteSize; }