There's a lot of use of int's in this lib, in some case they should be unsigned, in others we only need 8 bits etc.... Additionally since sizeof(int) is defined per compiler, it's recommended to use the more explicit stdint.h types.
This would be a lot of work, but I think it would help code readability.