How does JavaScript handle it when a Blob
or File
has a length greater than Number.MAX_SAFE_INTEGER
bytes (8 PiB; 9 PB)?
let file = await filePrompt("Please upload a ten petabyte file.");
let len = file.byteLength;
for ( let i = ((len <= Number.MAX_SAFE_INTEGER) ? 0 : BigInt(0)) ; i < len ; i++ ) {
…
}
In the above code, for example, will typeof len === 'bigint'
?
(I do not have access to a runtime environment with enough resources to test this.)