mixins/fs-db.js
function readUint64(buffer, offset) {
  var hi = (buffer[offset] << 24 |
            buffer[offset + 1] << 16 |
            buffer[offset + 2] << 8 |
            buffer[offset + 3] << 0) >>> 0;
  var lo = (buffer[offset + 4] << 24 |
            buffer[offset + 5] << 16 |
            buffer[offset + 6] << 8 |
            buffer[offset + 7] << 0) >>> 0;
  return hi * 0x100000000 + lo;
}
function readUint64(buffer, offset) {
  var hi = (buffer[offset] << 24 |
            buffer[offset + 1] << 16 |
            buffer[offset + 2] << 8 |
            buffer[offset + 3] << 0) >>> 0;
  var lo = (buffer[offset + 4] << 24 |
            buffer[offset + 5] << 16 |
            buffer[offset + 6] << 8 |
            buffer[offset + 7] << 0) >>> 0;
  return hi * 0x100000000 + lo;
}
function readUint64 ( buffer , offset ) { var hi = ( buffer [ offset ] << 24 | buffer [ offset + 1 ] << 16 | buffer [ offset + 2 ] << 8 | buffer [ offset + 3 ] << 0 ) >>> 0 ; var lo = ( buffer [ offset + 4 ] << 24 | buffer [ offset + 5 ] << 16 | buffer [ offset + 6 ] << 8 | buffer [ offset + 7 ] << 0 ) >>> 0 ; return hi * 0x100000000 + lo ; }
Yes this will lose precision over 2^53, but that can't be helped when returning a single integer. We simply won't support packfiles over 8 petabytes. I'm ok with that.
Yes this will lose precision over 2^53 but that can t be helped when returning a single integer . We simply won t support packfiles over 8 petabytes . I m ok with that .