Generic CRC algorithm generator, from Mark Adler | Hacker News Reader