Ævar suggested that using typemaps quite a bit of code could be cleaned
up and have some of the default sanity checks for free (see generated C
code in Brotli.c).
This also allows removing some of the perl sub wrappers, althought there
are some more cleanups that could be done on that, and the impact is
arguably low-to-none.