What I meant was this function can just calculate the uncompressedSize (which is basically incrementing by 1 byte per element), and then compressedSize is imply uncompressedSize / 8 with rounding.