File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -284,11 +284,7 @@ export class XetBlob extends Blob {
284284 const result = await iterator . next ( ) ;
285285
286286 if ( result . value ) {
287- // Split into chunks of 1000 bytes since `ByteLengthQueuingStrategy` fails in Node.js due to size being a function
288- const chunkSize = 1_000 ;
289- for ( let i = 0 ; i < result . value . length ; i += chunkSize ) {
290- controller . enqueue ( result . value . slice ( i , i + chunkSize ) ) ;
291- }
287+ controller . enqueue ( result . value ) ;
292288 }
293289
294290 if ( result . done ) {
@@ -298,7 +294,7 @@ export class XetBlob extends Blob {
298294 type : "bytes" ,
299295 // todo: when Safari supports it, add autoAllocateChunkSize param
300296 } ,
301- // todo : use ByteLengthQueuingStrategy when there's good support for it
297+ // todo : use ByteLengthQueuingStrategy when there's good support for it, currently in Node.js it fails due to size being a function
302298 {
303299 highWaterMark : 1_000 , // 1_000 chunks for ~1MB of RAM
304300 }
You can’t perform that action at this time.
0 commit comments