ha! basemeow works! somehow!
it doesn't handle underflow in the arithmetic encoder yet so it crashes on some inputs, but heh, i am happy it at least works
$ echo "hi fedi fwens 😁 ur all ghey" | cargo -q run -- encode
meeow meow meeeow x3 meow meeeow meow N meeow NYAN meow N meow mrrppppp MEW MEOW MEEW meow mrp mrrp mrp MEOW mrpppppp mrppp n miauw meow nyan MEOW mrrpppp x3 MEEOW meow meow mrrp meow meeeow meow nyanyan N meeeow mrpp x3 x3 MEOW MRRRP meow mrp 😁 N MRRP x3 😁 meow MEOW meeow mrp meow MEW MEOW MEOW NYAAN N 😁 m
$ echo -n "meeow meow meeeow x3 meow meeeow meow N meeow NYAN meow N meow mrrppppp MEW MEOW MEEW meow mrp mrrp mrp MEOW mrpppppp mrppp n miauw meow nyan MEOW mrrpppp x3 MEEOW meow meow mrrp meow meeeow meow nyanyan N meeeow mrpp x3 x3 MEOW MRRRP meow mrp 😁 N MRRP x3 😁 meow MEOW meeow mrp meow MEW MEOW MEOW NYAAN N 😁 m" | cargo -q run -- decode
hi fedi fwens 😁 ur all ghey
code: https://codeberg.org/lumi/basemeow
i really need to clean it up... Frac is such a leaky abstraction right now
you can see how much i struggled from the amount of tests
bit twiddling is annoying
it will become incompatible once i change the corpus to include all of fedi's meows