ext-chunkutils2 icon indicating copy to clipboard operation
ext-chunkutils2 copied to clipboard

PalettedBlockArray::fromData() does not require any user input about bits-per-block

Open dktapps opened this issue 3 years ago • 0 comments

Bits-per-block can be inferred from the size of the offset table (or $words), meaning that having this parameter at all is completely redundant.

The only thing bpb is required for is to know how many bytes to read when decoding palettes from disk, which is not something fromData has to care about. It only needs to care that the provided data is valid. This useless parameter is just providing an extra avenue for potential bugs.

dktapps avatar Apr 27 '22 16:04 dktapps