byte packFXP8_8(byte[] buffer, double value) {
   short intValue = (short) (value * 256.0);
   swap16(intValue, buffer);
   return 2;
 }
 byte packINT16(byte[] buffer, short value) {
   swap16(value, buffer);
   return 2;
 }
 byte packPercentage(byte[] buffer, double value) {
   short intValue = (short) (value * 32767.0);
   swap16(intValue, buffer);
   return 2;
 }