function decodeInt16(data, offset) {
  var u = (data[offset + 1] << 8) | data[offset + 0];
  return u > 32768 - 1 ? u - 65536 : u;
}
Gets an int16 from a byte buffer.
@param {!Uint8Array} data Source buffer.
@param {number} offset Starting offset in the buffer.
@return {number} Int16 value.