So I’ve been thinking about creating a golflang somewhat inspired by Jelly, but I’ve decided for it to be encoded in a 9-bit codepage, so that there are 512 possible characters to use. I can come up with a few different ways to score this, but I want to know what the recommended scoring method would be.
Just count each character as 1 byte. This doesn’t seem fair, though, since there’s more information per character than in languages with an 8-bit codepage, so I wouldn’t recommend this.
Count each character as 1.125 bytes. This would probably be the closest thing there is to a direct equivalence. The final result can either be left as a fractional value or rounded up, since a file in this encoding would have to be padded with up to seven bits at the end to make it an integer number of bytes.
Count each character as 2 bytes, as in UTF-16. This would be the way my files would normally be stored before being compressed into the 1.125 bytes per character format.
What do you think?
xxxxxxxxx yyyyyyyyy zzzzzzzzz
are encoded into 4 bytesxxxxxxxx xyyyyyyy yyzzzzzz zzz00000
. \$\endgroup\$is:question
orviews:0
along with the search terms to only search for questions. If a similar question has been closed ([closed]
,[on hold]
or[duplicate]
marking), your question may also be closed as a dupe or because of the close reason of the other question. \$\endgroup\$