Tiny UTF-8 Encoder for C
MIT License
Tute Feighty
A tiny UTF-8 encoder for C.
$ ./codegen.py
$ gcc src/* test/test.c -Iinclude
$ ./a.out
A quick brown fox jumps over the lazy dog
Nech ji hn saxofony bl rozezvu s dsnmi tny waltzu, tanga a quickstepu.
Pijamal hasta yaz ofre abucak gvendi.
Pdur Zagrebi tellomngija-fljetonist Ciqo klmetas kehvas garaais
? , !
Pijamal hasta yaz ofre abucak gvendi.
Flygande bckasiner ska hwila p mjuka tuvor.
Jeu kltw, spd Finom cz gry hab!
11 passed, 0 failed tests
512 bytes + overhead per encoding.
$ for i in src/*; do gcc -c $i -O1; done
$ du -bhc *.o | grep total
32K total
$ for i in src/*; do gcc -c $i -O3; done
$ du -bhc *.o | grep total
32K total
$ for i in src/*; do gcc -c $i -Os; done
$ du -bhc *.o | grep total
28K total