bireader 3.1.9 → 3.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/index.browser.d.ts +117 -58
- package/dist/index.browser.js +105 -37
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.d.ts +228 -116
- package/dist/index.cjs.js +206 -75
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +228 -116
- package/dist/index.esm.d.ts +228 -116
- package/dist/index.esm.js +206 -75
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.d.ts
CHANGED
|
@@ -22,6 +22,12 @@ type BiOptions = {
|
|
|
22
22
|
* Amount of data to add when extending the buffer array when strict mode is false. Note: Changes login in ``.get`` and ``.return``.
|
|
23
23
|
*/
|
|
24
24
|
extendBufferSize?: number;
|
|
25
|
+
/**
|
|
26
|
+
* When reading a 64 bit value, the reader checks if the value is safe for a ``number`` type and convert it.
|
|
27
|
+
*
|
|
28
|
+
* Set this to ``true`` if you wish for it to always stay a ``BigInt``.
|
|
29
|
+
*/
|
|
30
|
+
enforceBigInt?: boolean;
|
|
25
31
|
};
|
|
26
32
|
type hexdumpOptions = {
|
|
27
33
|
/**
|
|
@@ -140,6 +146,7 @@ declare class BiBase {
|
|
|
140
146
|
*/
|
|
141
147
|
private strDefaults;
|
|
142
148
|
maxFileSize: number | null;
|
|
149
|
+
enforceBigInt: boolean;
|
|
143
150
|
constructor();
|
|
144
151
|
/**
|
|
145
152
|
* Settings for when using .str
|
|
@@ -1282,11 +1289,13 @@ declare class BiBase {
|
|
|
1282
1289
|
/**
|
|
1283
1290
|
* Read signed 64 bit integer.
|
|
1284
1291
|
*
|
|
1292
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
1293
|
+
*
|
|
1285
1294
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
1286
1295
|
* @param {endian?} endian - ``big`` or ``little``
|
|
1287
|
-
* @returns {
|
|
1296
|
+
* @returns {BigValue}
|
|
1288
1297
|
*/
|
|
1289
|
-
readInt64(unsigned?: boolean, endian?: endian):
|
|
1298
|
+
readInt64(unsigned?: boolean, endian?: endian): BigValue;
|
|
1290
1299
|
/**
|
|
1291
1300
|
* Write 64 bit integer.
|
|
1292
1301
|
*
|
|
@@ -1329,33 +1338,43 @@ declare class BiBase {
|
|
|
1329
1338
|
/**
|
|
1330
1339
|
* Read unsigned 64 bit integer.
|
|
1331
1340
|
*
|
|
1332
|
-
*
|
|
1341
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
1342
|
+
*
|
|
1343
|
+
* @returns {BigValue}
|
|
1333
1344
|
*/
|
|
1334
|
-
readUInt64():
|
|
1345
|
+
readUInt64(): BigValue;
|
|
1335
1346
|
/**
|
|
1336
1347
|
* Read signed 64 bit integer.
|
|
1337
1348
|
*
|
|
1338
|
-
*
|
|
1349
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
1350
|
+
*
|
|
1351
|
+
* @returns {BigValue}
|
|
1339
1352
|
*/
|
|
1340
|
-
readInt64BE():
|
|
1353
|
+
readInt64BE(): BigValue;
|
|
1341
1354
|
/**
|
|
1342
1355
|
* Read unsigned 64 bit integer.
|
|
1343
1356
|
*
|
|
1344
|
-
*
|
|
1357
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
1358
|
+
*
|
|
1359
|
+
* @returns {BigValue}
|
|
1345
1360
|
*/
|
|
1346
|
-
readUInt64BE():
|
|
1361
|
+
readUInt64BE(): BigValue;
|
|
1347
1362
|
/**
|
|
1348
1363
|
* Read signed 64 bit integer.
|
|
1349
1364
|
*
|
|
1350
|
-
*
|
|
1365
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
1366
|
+
*
|
|
1367
|
+
* @returns {BigValue}
|
|
1351
1368
|
*/
|
|
1352
|
-
readInt64LE():
|
|
1369
|
+
readInt64LE(): BigValue;
|
|
1353
1370
|
/**
|
|
1354
1371
|
* Read unsigned 64 bit integer.
|
|
1355
1372
|
*
|
|
1356
|
-
*
|
|
1373
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
1374
|
+
*
|
|
1375
|
+
* @returns {BigValue}
|
|
1357
1376
|
*/
|
|
1358
|
-
readUInt64LE():
|
|
1377
|
+
readUInt64LE(): BigValue;
|
|
1359
1378
|
/**
|
|
1360
1379
|
* Read double float.
|
|
1361
1380
|
*
|
|
@@ -1427,11 +1446,12 @@ declare class BiBase {
|
|
|
1427
1446
|
*
|
|
1428
1447
|
* @param {Buffer|Uint8Array} data - ``Buffer`` or ``Uint8Array``. Always found in ``BiReader.data``
|
|
1429
1448
|
* @param {BiOptions?} options - Any options to set at start
|
|
1430
|
-
* @param {
|
|
1431
|
-
* @param {
|
|
1432
|
-
* @param {
|
|
1433
|
-
* @param {
|
|
1434
|
-
* @param {
|
|
1449
|
+
* @param {BiOptions["byteOffset"]?} options.byteOffset - Byte offset to start writer (default ``0``)
|
|
1450
|
+
* @param {BiOptions["bitOffset"]?} options.bitOffset - Bit offset 0-7 to start writer (default ``0``)
|
|
1451
|
+
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
1452
|
+
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
1453
|
+
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
1454
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
1435
1455
|
*
|
|
1436
1456
|
* @since 2.0
|
|
1437
1457
|
*/
|
|
@@ -1441,11 +1461,12 @@ declare class BiReader extends BiBase {
|
|
|
1441
1461
|
*
|
|
1442
1462
|
* @param {Buffer|Uint8Array} data - ``Buffer`` or ``Uint8Array``. Always found in ``BiReader.data``
|
|
1443
1463
|
* @param {BiOptions?} options - Any options to set at start
|
|
1444
|
-
* @param {
|
|
1445
|
-
* @param {
|
|
1446
|
-
* @param {
|
|
1447
|
-
* @param {
|
|
1448
|
-
* @param {
|
|
1464
|
+
* @param {BiOptions["byteOffset"]?} options.byteOffset - Byte offset to start writer (default ``0``)
|
|
1465
|
+
* @param {BiOptions["bitOffset"]?} options.bitOffset - Bit offset 0-7 to start writer (default ``0``)
|
|
1466
|
+
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
1467
|
+
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
1468
|
+
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
1469
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
1449
1470
|
*/
|
|
1450
1471
|
constructor(data: Buffer | Uint8Array, options?: BiOptions);
|
|
1451
1472
|
/**
|
|
@@ -3376,111 +3397,147 @@ declare class BiReader extends BiBase {
|
|
|
3376
3397
|
/**
|
|
3377
3398
|
* Read signed 64 bit integer
|
|
3378
3399
|
*
|
|
3379
|
-
*
|
|
3400
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3401
|
+
*
|
|
3402
|
+
* @returns {BigValue}
|
|
3380
3403
|
*/
|
|
3381
|
-
get int64():
|
|
3404
|
+
get int64(): BigValue;
|
|
3382
3405
|
/**
|
|
3383
3406
|
* Read signed 64 bit integer.
|
|
3384
3407
|
*
|
|
3385
|
-
*
|
|
3408
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3409
|
+
*
|
|
3410
|
+
* @returns {BigValue}
|
|
3386
3411
|
*/
|
|
3387
|
-
get bigint():
|
|
3412
|
+
get bigint(): BigValue;
|
|
3388
3413
|
/**
|
|
3389
3414
|
* Read signed 64 bit integer.
|
|
3390
3415
|
*
|
|
3391
|
-
*
|
|
3416
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3417
|
+
*
|
|
3418
|
+
* @returns {BigValue}
|
|
3392
3419
|
*/
|
|
3393
|
-
get quad():
|
|
3420
|
+
get quad(): BigValue;
|
|
3394
3421
|
/**
|
|
3395
3422
|
* Read unsigned 64 bit integer.
|
|
3396
3423
|
*
|
|
3397
|
-
*
|
|
3424
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3425
|
+
*
|
|
3426
|
+
* @returns {BigValue}
|
|
3398
3427
|
*/
|
|
3399
|
-
get uint64():
|
|
3428
|
+
get uint64(): BigValue;
|
|
3400
3429
|
/**
|
|
3401
3430
|
* Read unsigned 64 bit integer.
|
|
3402
3431
|
*
|
|
3403
|
-
*
|
|
3432
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3433
|
+
*
|
|
3434
|
+
* @returns {BigValue}
|
|
3404
3435
|
*/
|
|
3405
|
-
get ubigint():
|
|
3436
|
+
get ubigint(): BigValue;
|
|
3406
3437
|
/**
|
|
3407
3438
|
* Read unsigned 64 bit integer.
|
|
3408
3439
|
*
|
|
3409
|
-
*
|
|
3440
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3441
|
+
*
|
|
3442
|
+
* @returns {BigValue}
|
|
3410
3443
|
*/
|
|
3411
|
-
get uquad():
|
|
3444
|
+
get uquad(): BigValue;
|
|
3412
3445
|
/**
|
|
3413
3446
|
* Read signed 64 bit integer.
|
|
3414
3447
|
*
|
|
3415
|
-
*
|
|
3448
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3449
|
+
*
|
|
3450
|
+
* @returns {BigValue}
|
|
3416
3451
|
*/
|
|
3417
|
-
get int64be():
|
|
3452
|
+
get int64be(): BigValue;
|
|
3418
3453
|
/**
|
|
3419
3454
|
* Read signed 64 bit integer.
|
|
3420
3455
|
*
|
|
3421
|
-
*
|
|
3456
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3457
|
+
*
|
|
3458
|
+
* @returns {BigValue}
|
|
3422
3459
|
*/
|
|
3423
|
-
get bigintbe():
|
|
3460
|
+
get bigintbe(): BigValue;
|
|
3424
3461
|
/**
|
|
3425
3462
|
* Read signed 64 bit integer.
|
|
3426
3463
|
*
|
|
3427
|
-
*
|
|
3464
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3465
|
+
*
|
|
3466
|
+
* @returns {BigValue}
|
|
3428
3467
|
*/
|
|
3429
|
-
get quadbe():
|
|
3468
|
+
get quadbe(): BigValue;
|
|
3430
3469
|
/**
|
|
3431
3470
|
* Read unsigned 64 bit integer.
|
|
3432
3471
|
*
|
|
3433
|
-
*
|
|
3472
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3473
|
+
*
|
|
3474
|
+
* @returns {BigValue}
|
|
3434
3475
|
*/
|
|
3435
|
-
get uint64be():
|
|
3476
|
+
get uint64be(): BigValue;
|
|
3436
3477
|
/**
|
|
3437
3478
|
* Read unsigned 64 bit integer.
|
|
3438
3479
|
*
|
|
3439
|
-
*
|
|
3480
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3481
|
+
*
|
|
3482
|
+
* @returns {BigValue}
|
|
3440
3483
|
*/
|
|
3441
|
-
get ubigintbe():
|
|
3484
|
+
get ubigintbe(): BigValue;
|
|
3442
3485
|
/**
|
|
3443
3486
|
* Read unsigned 64 bit integer.
|
|
3444
3487
|
*
|
|
3445
|
-
*
|
|
3488
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3489
|
+
*
|
|
3490
|
+
* @returns {BigValue}
|
|
3446
3491
|
*/
|
|
3447
|
-
get uquadbe():
|
|
3492
|
+
get uquadbe(): BigValue;
|
|
3448
3493
|
/**
|
|
3449
3494
|
* Read signed 64 bit integer.
|
|
3450
3495
|
*
|
|
3451
|
-
*
|
|
3496
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3497
|
+
*
|
|
3498
|
+
* @returns {BigValue}
|
|
3452
3499
|
*/
|
|
3453
|
-
get int64le():
|
|
3500
|
+
get int64le(): BigValue;
|
|
3454
3501
|
/**
|
|
3455
3502
|
* Read signed 64 bit integer.
|
|
3456
3503
|
*
|
|
3457
|
-
*
|
|
3504
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3505
|
+
*
|
|
3506
|
+
* @returns {BigValue}
|
|
3458
3507
|
*/
|
|
3459
|
-
get bigintle():
|
|
3508
|
+
get bigintle(): BigValue;
|
|
3460
3509
|
/**
|
|
3461
3510
|
* Read signed 64 bit integer.
|
|
3462
3511
|
*
|
|
3463
|
-
*
|
|
3512
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3513
|
+
*
|
|
3514
|
+
* @returns {BigValue}
|
|
3464
3515
|
*/
|
|
3465
|
-
get quadle():
|
|
3516
|
+
get quadle(): BigValue;
|
|
3466
3517
|
/**
|
|
3467
3518
|
* Read unsigned 64 bit integer.
|
|
3468
3519
|
*
|
|
3469
|
-
*
|
|
3520
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3521
|
+
*
|
|
3522
|
+
* @returns {BigValue}
|
|
3470
3523
|
*/
|
|
3471
|
-
get uint64le():
|
|
3524
|
+
get uint64le(): BigValue;
|
|
3472
3525
|
/**
|
|
3473
3526
|
* Read unsigned 64 bit integer.
|
|
3474
3527
|
*
|
|
3475
|
-
*
|
|
3528
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3529
|
+
*
|
|
3530
|
+
* @returns {BigValue}
|
|
3476
3531
|
*/
|
|
3477
|
-
get ubigintle():
|
|
3532
|
+
get ubigintle(): BigValue;
|
|
3478
3533
|
/**
|
|
3479
3534
|
* Read unsigned 64 bit integer.
|
|
3480
3535
|
*
|
|
3481
|
-
*
|
|
3536
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
3537
|
+
*
|
|
3538
|
+
* @returns {BigValue}
|
|
3482
3539
|
*/
|
|
3483
|
-
get uquadle():
|
|
3540
|
+
get uquadle(): BigValue;
|
|
3484
3541
|
/**
|
|
3485
3542
|
* Read double float.
|
|
3486
3543
|
*
|
|
@@ -3797,6 +3854,7 @@ declare class BiReader extends BiBase {
|
|
|
3797
3854
|
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
3798
3855
|
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
3799
3856
|
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
3857
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
3800
3858
|
*
|
|
3801
3859
|
* @since 2.0
|
|
3802
3860
|
*/
|
|
@@ -3811,6 +3869,7 @@ declare class BiWriter extends BiBase {
|
|
|
3811
3869
|
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
3812
3870
|
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
3813
3871
|
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
3872
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
3814
3873
|
*/
|
|
3815
3874
|
constructor(data?: Buffer | Uint8Array, options?: BiOptions);
|
|
3816
3875
|
/**
|
|
@@ -6198,6 +6257,7 @@ declare class BiBaseStreamer {
|
|
|
6198
6257
|
*/
|
|
6199
6258
|
private strDefaults;
|
|
6200
6259
|
maxFileSize: number | null;
|
|
6260
|
+
enforceBigInt: boolean;
|
|
6201
6261
|
constructor(filePath: string, readwrite: boolean);
|
|
6202
6262
|
/**
|
|
6203
6263
|
* Settings for when using .str
|
|
@@ -7376,11 +7436,13 @@ declare class BiBaseStreamer {
|
|
|
7376
7436
|
/**
|
|
7377
7437
|
* Read signed 64 bit integer.
|
|
7378
7438
|
*
|
|
7439
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
7440
|
+
*
|
|
7379
7441
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
7380
7442
|
* @param {endian?} endian - ``big`` or ``little``
|
|
7381
|
-
* @returns {
|
|
7443
|
+
* @returns {BigValue}
|
|
7382
7444
|
*/
|
|
7383
|
-
readInt64(unsigned?: boolean, endian?: endian):
|
|
7445
|
+
readInt64(unsigned?: boolean, endian?: endian): BigValue;
|
|
7384
7446
|
/**
|
|
7385
7447
|
* Write 64 bit integer.
|
|
7386
7448
|
*
|
|
@@ -7423,33 +7485,43 @@ declare class BiBaseStreamer {
|
|
|
7423
7485
|
/**
|
|
7424
7486
|
* Read unsigned 64 bit integer.
|
|
7425
7487
|
*
|
|
7426
|
-
*
|
|
7488
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
7489
|
+
*
|
|
7490
|
+
* @returns {BigValue}
|
|
7427
7491
|
*/
|
|
7428
|
-
readUInt64():
|
|
7492
|
+
readUInt64(): BigValue;
|
|
7429
7493
|
/**
|
|
7430
7494
|
* Read signed 64 bit integer.
|
|
7431
7495
|
*
|
|
7432
|
-
*
|
|
7496
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
7497
|
+
*
|
|
7498
|
+
* @returns {BigValue}
|
|
7433
7499
|
*/
|
|
7434
|
-
readInt64BE():
|
|
7500
|
+
readInt64BE(): BigValue;
|
|
7435
7501
|
/**
|
|
7436
7502
|
* Read unsigned 64 bit integer.
|
|
7437
7503
|
*
|
|
7438
|
-
*
|
|
7504
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
7505
|
+
*
|
|
7506
|
+
* @returns {BigValue}
|
|
7439
7507
|
*/
|
|
7440
|
-
readUInt64BE():
|
|
7508
|
+
readUInt64BE(): BigValue;
|
|
7441
7509
|
/**
|
|
7442
7510
|
* Read signed 64 bit integer.
|
|
7443
7511
|
*
|
|
7444
|
-
*
|
|
7512
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
7513
|
+
*
|
|
7514
|
+
* @returns {BigValue}
|
|
7445
7515
|
*/
|
|
7446
|
-
readInt64LE():
|
|
7516
|
+
readInt64LE(): BigValue;
|
|
7447
7517
|
/**
|
|
7448
7518
|
* Read unsigned 64 bit integer.
|
|
7449
7519
|
*
|
|
7450
|
-
*
|
|
7520
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
7521
|
+
*
|
|
7522
|
+
* @returns {BigValue}
|
|
7451
7523
|
*/
|
|
7452
|
-
readUInt64LE():
|
|
7524
|
+
readUInt64LE(): BigValue;
|
|
7453
7525
|
/**
|
|
7454
7526
|
* Read double float.
|
|
7455
7527
|
*
|
|
@@ -7521,11 +7593,12 @@ declare class BiBaseStreamer {
|
|
|
7521
7593
|
*
|
|
7522
7594
|
* @param {string} filePath - Path to file
|
|
7523
7595
|
* @param {BiOptions?} options - Any options to set at start
|
|
7524
|
-
* @param {
|
|
7525
|
-
* @param {
|
|
7526
|
-
* @param {
|
|
7527
|
-
* @param {
|
|
7528
|
-
* @param {
|
|
7596
|
+
* @param {BiOptions["byteOffset"]?} options.byteOffset - Byte offset to start writer (default ``0``)
|
|
7597
|
+
* @param {BiOptions["bitOffset"]?} options.bitOffset - Bit offset 0-7 to start writer (default ``0``)
|
|
7598
|
+
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
7599
|
+
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
7600
|
+
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
7601
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
7529
7602
|
*
|
|
7530
7603
|
* @since 3.1
|
|
7531
7604
|
*/
|
|
@@ -7537,11 +7610,12 @@ declare class BiReaderStream extends BiBaseStreamer {
|
|
|
7537
7610
|
*
|
|
7538
7611
|
* @param {string} filePath - Path to file
|
|
7539
7612
|
* @param {BiOptions?} options - Any options to set at start
|
|
7540
|
-
* @param {
|
|
7541
|
-
* @param {
|
|
7542
|
-
* @param {
|
|
7543
|
-
* @param {
|
|
7544
|
-
* @param {
|
|
7613
|
+
* @param {BiOptions["byteOffset"]?} options.byteOffset - Byte offset to start writer (default ``0``)
|
|
7614
|
+
* @param {BiOptions["bitOffset"]?} options.bitOffset - Bit offset 0-7 to start writer (default ``0``)
|
|
7615
|
+
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
7616
|
+
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
7617
|
+
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
7618
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
7545
7619
|
*/
|
|
7546
7620
|
constructor(filePath: string, options?: BiOptions);
|
|
7547
7621
|
/**
|
|
@@ -9472,111 +9546,147 @@ declare class BiReaderStream extends BiBaseStreamer {
|
|
|
9472
9546
|
/**
|
|
9473
9547
|
* Read signed 64 bit integer
|
|
9474
9548
|
*
|
|
9475
|
-
*
|
|
9549
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9550
|
+
*
|
|
9551
|
+
* @returns {BigValue}
|
|
9476
9552
|
*/
|
|
9477
|
-
get int64():
|
|
9553
|
+
get int64(): BigValue;
|
|
9478
9554
|
/**
|
|
9479
9555
|
* Read signed 64 bit integer.
|
|
9480
9556
|
*
|
|
9481
|
-
*
|
|
9557
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9558
|
+
*
|
|
9559
|
+
* @returns {BigValue}
|
|
9482
9560
|
*/
|
|
9483
|
-
get bigint():
|
|
9561
|
+
get bigint(): BigValue;
|
|
9484
9562
|
/**
|
|
9485
9563
|
* Read signed 64 bit integer.
|
|
9486
9564
|
*
|
|
9487
|
-
*
|
|
9565
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9566
|
+
*
|
|
9567
|
+
* @returns {BigValue}
|
|
9488
9568
|
*/
|
|
9489
|
-
get quad():
|
|
9569
|
+
get quad(): BigValue;
|
|
9490
9570
|
/**
|
|
9491
9571
|
* Read unsigned 64 bit integer.
|
|
9492
9572
|
*
|
|
9493
|
-
*
|
|
9573
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9574
|
+
*
|
|
9575
|
+
* @returns {BigValue}
|
|
9494
9576
|
*/
|
|
9495
|
-
get uint64():
|
|
9577
|
+
get uint64(): BigValue;
|
|
9496
9578
|
/**
|
|
9497
9579
|
* Read unsigned 64 bit integer.
|
|
9498
9580
|
*
|
|
9499
|
-
*
|
|
9581
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9582
|
+
*
|
|
9583
|
+
* @returns {BigValue}
|
|
9500
9584
|
*/
|
|
9501
|
-
get ubigint():
|
|
9585
|
+
get ubigint(): BigValue;
|
|
9502
9586
|
/**
|
|
9503
9587
|
* Read unsigned 64 bit integer.
|
|
9504
9588
|
*
|
|
9505
|
-
*
|
|
9589
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9590
|
+
*
|
|
9591
|
+
* @returns {BigValue}
|
|
9506
9592
|
*/
|
|
9507
|
-
get uquad():
|
|
9593
|
+
get uquad(): BigValue;
|
|
9508
9594
|
/**
|
|
9509
9595
|
* Read signed 64 bit integer.
|
|
9510
9596
|
*
|
|
9511
|
-
*
|
|
9597
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9598
|
+
*
|
|
9599
|
+
* @returns {BigValue}
|
|
9512
9600
|
*/
|
|
9513
|
-
get int64be():
|
|
9601
|
+
get int64be(): BigValue;
|
|
9514
9602
|
/**
|
|
9515
9603
|
* Read signed 64 bit integer.
|
|
9516
9604
|
*
|
|
9517
|
-
*
|
|
9605
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9606
|
+
*
|
|
9607
|
+
* @returns {BigValue}
|
|
9518
9608
|
*/
|
|
9519
|
-
get bigintbe():
|
|
9609
|
+
get bigintbe(): BigValue;
|
|
9520
9610
|
/**
|
|
9521
9611
|
* Read signed 64 bit integer.
|
|
9522
9612
|
*
|
|
9523
|
-
*
|
|
9613
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9614
|
+
*
|
|
9615
|
+
* @returns {BigValue}
|
|
9524
9616
|
*/
|
|
9525
|
-
get quadbe():
|
|
9617
|
+
get quadbe(): BigValue;
|
|
9526
9618
|
/**
|
|
9527
9619
|
* Read unsigned 64 bit integer.
|
|
9528
9620
|
*
|
|
9529
|
-
*
|
|
9621
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9622
|
+
*
|
|
9623
|
+
* @returns {BigValue}
|
|
9530
9624
|
*/
|
|
9531
|
-
get uint64be():
|
|
9625
|
+
get uint64be(): BigValue;
|
|
9532
9626
|
/**
|
|
9533
9627
|
* Read unsigned 64 bit integer.
|
|
9534
9628
|
*
|
|
9535
|
-
*
|
|
9629
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9630
|
+
*
|
|
9631
|
+
* @returns {BigValue}
|
|
9536
9632
|
*/
|
|
9537
|
-
get ubigintbe():
|
|
9633
|
+
get ubigintbe(): BigValue;
|
|
9538
9634
|
/**
|
|
9539
9635
|
* Read unsigned 64 bit integer.
|
|
9540
9636
|
*
|
|
9541
|
-
*
|
|
9637
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9638
|
+
*
|
|
9639
|
+
* @returns {BigValue}
|
|
9542
9640
|
*/
|
|
9543
|
-
get uquadbe():
|
|
9641
|
+
get uquadbe(): BigValue;
|
|
9544
9642
|
/**
|
|
9545
9643
|
* Read signed 64 bit integer.
|
|
9546
9644
|
*
|
|
9547
|
-
*
|
|
9645
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9646
|
+
*
|
|
9647
|
+
* @returns {BigValue}
|
|
9548
9648
|
*/
|
|
9549
|
-
get int64le():
|
|
9649
|
+
get int64le(): BigValue;
|
|
9550
9650
|
/**
|
|
9551
9651
|
* Read signed 64 bit integer.
|
|
9552
9652
|
*
|
|
9553
|
-
*
|
|
9653
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9654
|
+
*
|
|
9655
|
+
* @returns {BigValue}
|
|
9554
9656
|
*/
|
|
9555
|
-
get bigintle():
|
|
9657
|
+
get bigintle(): BigValue;
|
|
9556
9658
|
/**
|
|
9557
9659
|
* Read signed 64 bit integer.
|
|
9558
9660
|
*
|
|
9559
|
-
*
|
|
9661
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9662
|
+
*
|
|
9663
|
+
* @returns {BigValue}
|
|
9560
9664
|
*/
|
|
9561
|
-
get quadle():
|
|
9665
|
+
get quadle(): BigValue;
|
|
9562
9666
|
/**
|
|
9563
9667
|
* Read unsigned 64 bit integer.
|
|
9564
9668
|
*
|
|
9565
|
-
*
|
|
9669
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9670
|
+
*
|
|
9671
|
+
* @returns {BigValue}
|
|
9566
9672
|
*/
|
|
9567
|
-
get uint64le():
|
|
9673
|
+
get uint64le(): BigValue;
|
|
9568
9674
|
/**
|
|
9569
9675
|
* Read unsigned 64 bit integer.
|
|
9570
9676
|
*
|
|
9571
|
-
*
|
|
9677
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9678
|
+
*
|
|
9679
|
+
* @returns {BigValue}
|
|
9572
9680
|
*/
|
|
9573
|
-
get ubigintle():
|
|
9681
|
+
get ubigintle(): BigValue;
|
|
9574
9682
|
/**
|
|
9575
9683
|
* Read unsigned 64 bit integer.
|
|
9576
9684
|
*
|
|
9577
|
-
*
|
|
9685
|
+
* Note: If ``enforceBigInt`` was set to ``true``, this always returns a ``BigInt`` otherwise it will return a ``number`` if integer safe.
|
|
9686
|
+
*
|
|
9687
|
+
* @returns {BigValue}
|
|
9578
9688
|
*/
|
|
9579
|
-
get uquadle():
|
|
9689
|
+
get uquadle(): BigValue;
|
|
9580
9690
|
/**
|
|
9581
9691
|
* Read double float.
|
|
9582
9692
|
*
|
|
@@ -9895,6 +10005,7 @@ declare class BiReaderStream extends BiBaseStreamer {
|
|
|
9895
10005
|
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
9896
10006
|
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
9897
10007
|
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
10008
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
9898
10009
|
*
|
|
9899
10010
|
* @since 3.1
|
|
9900
10011
|
*/
|
|
@@ -9911,6 +10022,7 @@ declare class BiWriterStream extends BiBaseStreamer {
|
|
|
9911
10022
|
* @param {BiOptions["endianness"]?} options.endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
9912
10023
|
* @param {BiOptions["strict"]?} options.strict - Strict mode: if ``true`` does not extend supplied array on outside write (default ``false``)
|
|
9913
10024
|
* @param {BiOptions["extendBufferSize"]?} options.extendBufferSize - Amount of data to add when extending the buffer array when strict mode is false. Note: Changes logic in ``.get`` and ``.return``.
|
|
10025
|
+
* @param {BiOptions["enforceBigInt"]?} options.enforceBigInt - 64 bit value reads will always stay ``BigInt``.
|
|
9914
10026
|
*/
|
|
9915
10027
|
constructor(filePath: string, options?: BiOptions);
|
|
9916
10028
|
/**
|