@@ -202,7 +202,7 @@ export class XetBlob extends Blob {
202
202
rangeList . add ( term . range . start , term . range . end ) ;
203
203
}
204
204
const listener = this . listener ;
205
- const log = this . internalLogging ? ( ...args : unknown [ ] ) => console . log ( ...args ) : ( ) => { } ;
205
+ const log = this . internalLogging ? ( ...args : unknown [ ] ) => console . log ( ...args ) : ( ) => { } ;
206
206
207
207
async function * readData (
208
208
reconstructionInfo : ReconstructionInfo ,
@@ -359,7 +359,8 @@ export class XetBlob extends Blob {
359
359
chunkHeader . compression_scheme !== XetChunkCompressionScheme . ByteGroupingLZ4
360
360
) {
361
361
throw new Error (
362
- `Unsupported compression scheme ${ compressionSchemeLabels [ chunkHeader . compression_scheme ] ?? chunkHeader . compression_scheme
362
+ `Unsupported compression scheme ${
363
+ compressionSchemeLabels [ chunkHeader . compression_scheme ] ?? chunkHeader . compression_scheme
363
364
} `
364
365
) ;
365
366
}
@@ -376,13 +377,13 @@ export class XetBlob extends Blob {
376
377
chunkHeader . compression_scheme === XetChunkCompressionScheme . LZ4
377
378
? lz4_decompress ( result . value . slice ( 0 , chunkHeader . compressed_length ) , chunkHeader . uncompressed_length )
378
379
: chunkHeader . compression_scheme === XetChunkCompressionScheme . ByteGroupingLZ4
379
- ? bg4_regroup_bytes (
380
- lz4_decompress (
381
- result . value . slice ( 0 , chunkHeader . compressed_length ) ,
382
- chunkHeader . uncompressed_length
383
- )
384
- )
385
- : result . value . slice ( 0 , chunkHeader . compressed_length ) ;
380
+ ? bg4_regroup_bytes (
381
+ lz4_decompress (
382
+ result . value . slice ( 0 , chunkHeader . compressed_length ) ,
383
+ chunkHeader . uncompressed_length
384
+ )
385
+ )
386
+ : result . value . slice ( 0 , chunkHeader . compressed_length ) ;
386
387
387
388
const range = ranges . find ( ( range ) => chunkIndex >= range . start && chunkIndex < range . end ) ;
388
389
const shouldYield = chunkIndex >= term . range . start && chunkIndex < term . range . end ;
@@ -436,7 +437,8 @@ export class XetBlob extends Blob {
436
437
log ( "done" , done , "total read" , totalBytesRead , maxBytes , totalFetchBytes ) ;
437
438
log ( "failed to fetch all data for term" , term . hash ) ;
438
439
throw new Error (
439
- `Failed to fetch all data for term ${ term . hash } , fetched ${ totalFetchBytes } bytes out of ${ fetchInfo . url_range . end - fetchInfo . url_range . start + 1
440
+ `Failed to fetch all data for term ${ term . hash } , fetched ${ totalFetchBytes } bytes out of ${
441
+ fetchInfo . url_range . end - fetchInfo . url_range . start + 1
440
442
} `
441
443
) ;
442
444
}
@@ -647,8 +649,8 @@ async function getAccessToken(
647
649
headers : {
648
650
...( initialAccessToken
649
651
? {
650
- Authorization : `Bearer ${ initialAccessToken } ` ,
651
- }
652
+ Authorization : `Bearer ${ initialAccessToken } ` ,
653
+ }
652
654
: { } ) ,
653
655
} ,
654
656
} ) ;
0 commit comments