Re:Compressing Chess Moves for Fun and Profit
by vitus on Friday March 15, 2024 @05:21PM
(#39720850)
It was a minor point re: this claim:
> Values 0-255 take up one byte, 256-65535 take two bytes
If you wanted to encode more than 256 values, then at best you'd be able to specify values 0-254 taking one byte, e.g. if you used 0xff as a special prefix to represent "use another byte for all other values", but that particular encoding means that you'd only be able to encode another 256 values with a second byte.
> Values 0-255 take up one byte, 256-65535 take two bytes
If you wanted to encode more than 256 values, then at best you'd be able to specify values 0-254 taking one byte, e.g. if you used 0xff as a special prefix to represent "use another byte for all other values", but that particular encoding means that you'd only be able to encode another 256 values with a second byte.