There is an .stl file with charset us-ascii which must decode as string. It size is 622MB which used LoaderUtils in three.module.js to decode ascii ArrayBuffer But gotten empty string "".
For lighter files it works correctly.
class LoaderUtils {
static decodeText( array ) {
if ( typeof TextDecoder !== 'undefined' ) {
// array is ArrayBuffer - Uint8Array
console.log( array.length ); // 621757404
return new TextDecoder().decode( array );
}
}
}
How can it be solved ?
using of String.fromCharCode.apply(null, array) frieze browser