File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -421,15 +421,6 @@ export class FuzzedDataProvider {
421
421
return result ;
422
422
}
423
423
424
- /**
425
- * A simple conversion helper that yields the ASCII representation of a character.
426
- * @param char - A single character represented as a number
427
- * @returns The corresponding ASCII character represented as a number
428
- */
429
- toAscii ( char : number ) {
430
- return this . lookupTable [ char ] ;
431
- }
432
-
433
424
/**
434
425
* Helper function that converts the given string type into one that only
435
426
* contains printable characters. The quality of the output heaviliy depends
@@ -451,7 +442,7 @@ export class FuzzedDataProvider {
451
442
encoding : BufferEncoding
452
443
) : string {
453
444
for ( let i = min ; i < max ; i ++ ) {
454
- buf [ i ] = this . toAscii ( buf [ i ] ) ;
445
+ buf [ i ] = this . lookupTable [ buf [ i ] ] ;
455
446
}
456
447
return buf . subarray ( min , max ) . toString ( encoding ) ;
457
448
}
You can’t perform that action at this time.
0 commit comments