Fix warnings
Make {decode,encode}_int more compact in code size