buffer[3] = i & 0xFF;
}
+void StoreBigShort (unsigned char *buffer, unsigned short i)
+{
+ buffer[0] = (i >> 8) & 0xFF;
+ buffer[1] = i & 0xFF;
+}
+
+void StoreLittleLong (unsigned char *buffer, unsigned int i)
+{
+ buffer[0] = i & 0xFF;
+ buffer[1] = (i >> 8) & 0xFF;
+ buffer[2] = (i >> 16) & 0xFF;
+ buffer[3] = (i >> 24) & 0xFF;
+}
+
+void StoreLittleShort (unsigned char *buffer, unsigned short i)
+{
+ buffer[0] = i & 0xFF;
+ buffer[1] = (i >> 8) & 0xFF;
+}
+
/*
============================================================================
/// Encode a big endian 32bit int to the given \p buffer
void StoreBigLong (unsigned char *buffer, unsigned int i);
+
+/// Encode a big endian 16bit int to the given \p buffer
+void StoreBigShort (unsigned char *buffer, unsigned short i);
+
+/// Encode a little endian 32bit int to the given \p buffer
+void StoreLittleLong (unsigned char *buffer, unsigned int i);
+
+/// Encode a little endian 16bit int to the given \p buffer
+void StoreLittleShort (unsigned char *buffer, unsigned short i);
//@}
//============================================================================