what about replacing all `long` / `unsigned` and so on types with the clear: `uintXX_t` ? I prefer this way to make sure that the code is portable an running on 16 and 32 bits.

This file is not that big....