stripped off from woff.c