bytes2long static method

Int64 bytes2long(
  1. Uint8List byteArray,
  2. int offset
)

Implementation

static Int64 bytes2long(final Uint8List byteArray, final int offset) {
  // & 0xFF is useless
  return ((Int64.fromInts(0, byteArray[offset] & 0xFF)) |
      (Int64.parseInt((byteArray[offset + 1] & 0xFF).toString()) << 8) |
      (Int64.parseInt((byteArray[offset + 2] & 0xFF).toString()) << 16) |
      (Int64.parseInt((byteArray[offset + 3] & 0xFF).toString()) << 24) |
      (Int64.parseInt((byteArray[offset + 4] & 0xFF).toString()) << 32) |
      (Int64.parseInt((byteArray[offset + 5] & 0xFF).toString()) << 40) |
      (Int64.parseInt((byteArray[offset + 6] & 0xFF).toString()) << 48) |
      (Int64.parseInt((byteArray[offset + 7] & 0xFF).toString()) << 56));
}