Fix signed/unsigned comparison
Remove invalid template specifier from DynamicPacket declaration
Code formatting
Include endian.h on Android
Add missing include and throw logic_error instead of runtime_error