64 bit integers

Ingvar Stepanyan edited this page Aug 27, 2013 · 1 revision

jDataView provides I/O methods for 64-bit signed and unsigned integer types.

IMPORTANT: Those types behave like primitive numbers (you can manipulate with them using arithmetic operations, convert them to strings etc.)., BUT due to IEEE.754 limitations, there is precision loss for numbers outside the ±2^53 range, and that's why they also contain lo and hi fields for retrieving corresponding 32-bit unsigned parts. You can pass both primitive numbers (with the same restriction as above) or jDataView.Uint64/jDataView.Int64 instances with lo and hi fields to writer functions as well.

  • getInt64(byteOffset, littleEndian)
  • setInt64(byteOffset, value, littleEndian)
  • writeInt64(value, littleEndian)
  • getUint64(byteOffset, littleEndian)
  • setUint64(byteOffset, value, littleEndian)
  • writeUint64(value, littleEndian)