encoding.c: Upgrade upcase table and rewrite decompression code