Text <-> byte blocks

untitled script pic
How it works:

  • If the character is either 0 or 255, put 0 before the character value
  • If the character is higher than 254, put 255, then the character value in base 254, then 255.
  • Else, just put the character value.

Alternate version with base 253 instead to make room for 255 as an EOT marker, so it is compatible with Burrows–Wheeler transform
untitled script pic (1)