bireader 3.1.2 → 3.1.4

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/dist/index.cjs.js CHANGED
@@ -2271,7 +2271,7 @@ class BiBase {
2271
2271
  *
2272
2272
  * Does not change current read position.
2273
2273
  *
2274
- * @param {number} value - Number to search for.
2274
+ * @param {BigValue} value - Number to search for.
2275
2275
  * @param {boolean} unsigned - If the number is unsigned (default true)
2276
2276
  * @param {endian} endian - endianness of value (default set endian).
2277
2277
  */
@@ -3441,7 +3441,7 @@ class BiBase {
3441
3441
  *
3442
3442
  * @param {boolean} unsigned - if value is unsigned or not
3443
3443
  * @param {endian?} endian - ``big`` or ``little``
3444
- * @returns {number}
3444
+ * @returns {bigint}
3445
3445
  */
3446
3446
  readInt64(unsigned, endian) {
3447
3447
  return rint64$1(this, unsigned, endian);
@@ -3449,7 +3449,7 @@ class BiBase {
3449
3449
  /**
3450
3450
  * Write 64 bit integer.
3451
3451
  *
3452
- * @param {number} value - value as int
3452
+ * @param {BigValue} value - value as int
3453
3453
  * @param {boolean} unsigned - if the value is unsigned
3454
3454
  * @param {endian} endian - ``big`` or ``little``
3455
3455
  */
@@ -3459,7 +3459,7 @@ class BiBase {
3459
3459
  /**
3460
3460
  * Write unsigned 64 bit integer.
3461
3461
  *
3462
- * @param {number} value - value as int
3462
+ * @param {BigValue} value - value as int
3463
3463
  * @param {endian} endian - ``big`` or ``little``
3464
3464
  */
3465
3465
  writeUInt64(value, endian) {
@@ -3468,7 +3468,7 @@ class BiBase {
3468
3468
  /**
3469
3469
  * Write signed 64 bit integer.
3470
3470
  *
3471
- * @param {number} value - value as int
3471
+ * @param {BigValue} value - value as int
3472
3472
  */
3473
3473
  writeInt64LE(value) {
3474
3474
  return this.writeInt64(value, false, "little");
@@ -3476,7 +3476,7 @@ class BiBase {
3476
3476
  /**
3477
3477
  * Write unsigned 64 bit integer.
3478
3478
  *
3479
- * @param {number} value - value as int
3479
+ * @param {BigValue} value - value as int
3480
3480
  */
3481
3481
  writeUInt64LE(value) {
3482
3482
  return this.writeInt64(value, true, "little");
@@ -3484,7 +3484,7 @@ class BiBase {
3484
3484
  /**
3485
3485
  * Write signed 64 bit integer.
3486
3486
  *
3487
- * @param {number} value - value as int
3487
+ * @param {BigValue} value - value as int
3488
3488
  */
3489
3489
  writeInt64BE(value) {
3490
3490
  return this.writeInt64(value, false, "big");
@@ -3492,7 +3492,7 @@ class BiBase {
3492
3492
  /**
3493
3493
  * Write unsigned 64 bit integer.
3494
3494
  *
3495
- * @param {number} value - value as int
3495
+ * @param {BigValue} value - value as int
3496
3496
  */
3497
3497
  writeUInt64BE(value) {
3498
3498
  return this.writeInt64(value, true, "big");
@@ -3500,7 +3500,7 @@ class BiBase {
3500
3500
  /**
3501
3501
  * Read unsigned 64 bit integer.
3502
3502
  *
3503
- * @returns {number}
3503
+ * @returns {bigint}
3504
3504
  */
3505
3505
  readUInt64() {
3506
3506
  return this.readInt64(true);
@@ -3508,7 +3508,7 @@ class BiBase {
3508
3508
  /**
3509
3509
  * Read signed 64 bit integer.
3510
3510
  *
3511
- * @returns {number}
3511
+ * @returns {bigint}
3512
3512
  */
3513
3513
  readInt64BE() {
3514
3514
  return this.readInt64(false, "big");
@@ -3516,7 +3516,7 @@ class BiBase {
3516
3516
  /**
3517
3517
  * Read unsigned 64 bit integer.
3518
3518
  *
3519
- * @returns {number}
3519
+ * @returns {bigint}
3520
3520
  */
3521
3521
  readUInt64BE() {
3522
3522
  return this.readInt64(true, "big");
@@ -3524,7 +3524,7 @@ class BiBase {
3524
3524
  /**
3525
3525
  * Read signed 64 bit integer.
3526
3526
  *
3527
- * @returns {number}
3527
+ * @returns {bigint}
3528
3528
  */
3529
3529
  readInt64LE() {
3530
3530
  return this.readInt64(false, "little");
@@ -3532,7 +3532,7 @@ class BiBase {
3532
3532
  /**
3533
3533
  * Read unsigned 64 bit integer.
3534
3534
  *
3535
- * @returns {number}
3535
+ * @returns {bigint}
3536
3536
  */
3537
3537
  readUInt64LE() {
3538
3538
  return this.readInt64(true, "little");
@@ -6079,7 +6079,7 @@ function applyBinaryAliasReader(Base) {
6079
6079
  /**
6080
6080
  * Read signed 64 bit integer
6081
6081
  *
6082
- * @returns {number}
6082
+ * @returns {bigint}
6083
6083
  */
6084
6084
  get int64() {
6085
6085
  return this.readInt64();
@@ -6087,7 +6087,7 @@ function applyBinaryAliasReader(Base) {
6087
6087
  /**
6088
6088
  * Read signed 64 bit integer.
6089
6089
  *
6090
- * @returns {number}
6090
+ * @returns {bigint}
6091
6091
  */
6092
6092
  get bigint() {
6093
6093
  return this.readInt64();
@@ -6095,7 +6095,7 @@ function applyBinaryAliasReader(Base) {
6095
6095
  /**
6096
6096
  * Read signed 64 bit integer.
6097
6097
  *
6098
- * @returns {number}
6098
+ * @returns {bigint}
6099
6099
  */
6100
6100
  get quad() {
6101
6101
  return this.readInt64();
@@ -6103,7 +6103,7 @@ function applyBinaryAliasReader(Base) {
6103
6103
  /**
6104
6104
  * Read unsigned 64 bit integer.
6105
6105
  *
6106
- * @returns {number}
6106
+ * @returns {bigint}
6107
6107
  */
6108
6108
  get uint64() {
6109
6109
  return this.readInt64(true);
@@ -6111,7 +6111,7 @@ function applyBinaryAliasReader(Base) {
6111
6111
  /**
6112
6112
  * Read unsigned 64 bit integer.
6113
6113
  *
6114
- * @returns {number}
6114
+ * @returns {bigint}
6115
6115
  */
6116
6116
  get ubigint() {
6117
6117
  return this.readInt64(true);
@@ -6119,7 +6119,7 @@ function applyBinaryAliasReader(Base) {
6119
6119
  /**
6120
6120
  * Read unsigned 64 bit integer.
6121
6121
  *
6122
- * @returns {number}
6122
+ * @returns {bigint}
6123
6123
  */
6124
6124
  get uquad() {
6125
6125
  return this.readInt64(true);
@@ -6127,7 +6127,7 @@ function applyBinaryAliasReader(Base) {
6127
6127
  /**
6128
6128
  * Read signed 64 bit integer.
6129
6129
  *
6130
- * @returns {number}
6130
+ * @returns {bigint}
6131
6131
  */
6132
6132
  get int64be() {
6133
6133
  return this.readInt64(false, "big");
@@ -6135,7 +6135,7 @@ function applyBinaryAliasReader(Base) {
6135
6135
  /**
6136
6136
  * Read signed 64 bit integer.
6137
6137
  *
6138
- * @returns {number}
6138
+ * @returns {bigint}
6139
6139
  */
6140
6140
  get bigintbe() {
6141
6141
  return this.readInt64(false, "big");
@@ -6143,7 +6143,7 @@ function applyBinaryAliasReader(Base) {
6143
6143
  /**
6144
6144
  * Read signed 64 bit integer.
6145
6145
  *
6146
- * @returns {number}
6146
+ * @returns {bigint}
6147
6147
  */
6148
6148
  get quadbe() {
6149
6149
  return this.readInt64(false, "big");
@@ -6151,7 +6151,7 @@ function applyBinaryAliasReader(Base) {
6151
6151
  /**
6152
6152
  * Read unsigned 64 bit integer.
6153
6153
  *
6154
- * @returns {number}
6154
+ * @returns {bigint}
6155
6155
  */
6156
6156
  get uint64be() {
6157
6157
  return this.readInt64(true, "big");
@@ -6159,7 +6159,7 @@ function applyBinaryAliasReader(Base) {
6159
6159
  /**
6160
6160
  * Read unsigned 64 bit integer.
6161
6161
  *
6162
- * @returns {number}
6162
+ * @returns {bigint}
6163
6163
  */
6164
6164
  get ubigintbe() {
6165
6165
  return this.readInt64(true, "big");
@@ -6167,7 +6167,7 @@ function applyBinaryAliasReader(Base) {
6167
6167
  /**
6168
6168
  * Read unsigned 64 bit integer.
6169
6169
  *
6170
- * @returns {number}
6170
+ * @returns {bigint}
6171
6171
  */
6172
6172
  get uquadbe() {
6173
6173
  return this.readInt64(true, "big");
@@ -6175,7 +6175,7 @@ function applyBinaryAliasReader(Base) {
6175
6175
  /**
6176
6176
  * Read signed 64 bit integer.
6177
6177
  *
6178
- * @returns {number}
6178
+ * @returns {bigint}
6179
6179
  */
6180
6180
  get int64le() {
6181
6181
  return this.readInt64(false, "little");
@@ -6183,7 +6183,7 @@ function applyBinaryAliasReader(Base) {
6183
6183
  /**
6184
6184
  * Read signed 64 bit integer.
6185
6185
  *
6186
- * @returns {number}
6186
+ * @returns {bigint}
6187
6187
  */
6188
6188
  get bigintle() {
6189
6189
  return this.readInt64(false, "little");
@@ -6191,7 +6191,7 @@ function applyBinaryAliasReader(Base) {
6191
6191
  /**
6192
6192
  * Read signed 64 bit integer.
6193
6193
  *
6194
- * @returns {number}
6194
+ * @returns {bigint}
6195
6195
  */
6196
6196
  get quadle() {
6197
6197
  return this.readInt64(false, "little");
@@ -6199,7 +6199,7 @@ function applyBinaryAliasReader(Base) {
6199
6199
  /**
6200
6200
  * Read unsigned 64 bit integer.
6201
6201
  *
6202
- * @returns {number}
6202
+ * @returns {bigint}
6203
6203
  */
6204
6204
  get uint64le() {
6205
6205
  return this.readInt64(true, "little");
@@ -6207,7 +6207,7 @@ function applyBinaryAliasReader(Base) {
6207
6207
  /**
6208
6208
  * Read unsigned 64 bit integer.
6209
6209
  *
6210
- * @returns {number}
6210
+ * @returns {bigint}
6211
6211
  */
6212
6212
  get ubigintle() {
6213
6213
  return this.readInt64(true, "little");
@@ -6215,7 +6215,7 @@ function applyBinaryAliasReader(Base) {
6215
6215
  /**
6216
6216
  * Read unsigned 64 bit integer.
6217
6217
  *
6218
- * @returns {number}
6218
+ * @returns {bigint}
6219
6219
  */
6220
6220
  get uquadle() {
6221
6221
  return this.readInt64(true, "little");
@@ -10080,7 +10080,7 @@ function applyBinaryAliasWriter(Base) {
10080
10080
  /**
10081
10081
  * Write 64 bit integer.
10082
10082
  *
10083
- * @param {number} value - value as int
10083
+ * @param {number|bigint} value - value as int
10084
10084
  */
10085
10085
  set int64(value) {
10086
10086
  this.writeInt64(value);
@@ -10088,7 +10088,7 @@ function applyBinaryAliasWriter(Base) {
10088
10088
  /**
10089
10089
  * Write 64 bit integer.
10090
10090
  *
10091
- * @param {number} value - value as int
10091
+ * @param {number|bigint} value - value as int
10092
10092
  */
10093
10093
  set quad(value) {
10094
10094
  this.writeInt64(value);
@@ -10096,7 +10096,7 @@ function applyBinaryAliasWriter(Base) {
10096
10096
  /**
10097
10097
  * Write 64 bit integer.
10098
10098
  *
10099
- * @param {number} value - value as int
10099
+ * @param {number|bigint} value - value as int
10100
10100
  */
10101
10101
  set bigint(value) {
10102
10102
  this.writeInt64(value);
@@ -10104,7 +10104,7 @@ function applyBinaryAliasWriter(Base) {
10104
10104
  /**
10105
10105
  * Write unsigned 64 bit integer.
10106
10106
  *
10107
- * @param {number} value - value as int
10107
+ * @param {number|bigint} value - value as int
10108
10108
  */
10109
10109
  set uint64(value) {
10110
10110
  this.writeInt64(value, true);
@@ -10112,7 +10112,7 @@ function applyBinaryAliasWriter(Base) {
10112
10112
  /**
10113
10113
  * Write unsigned 64 bit integer.
10114
10114
  *
10115
- * @param {number} value - value as int
10115
+ * @param {number|bigint} value - value as int
10116
10116
  */
10117
10117
  set ubigint(value) {
10118
10118
  this.writeInt64(value, true);
@@ -10120,7 +10120,7 @@ function applyBinaryAliasWriter(Base) {
10120
10120
  /**
10121
10121
  * Write unsigned 64 bit integer.
10122
10122
  *
10123
- * @param {number} value - value as int
10123
+ * @param {number|bigint} value - value as int
10124
10124
  */
10125
10125
  set uquad(value) {
10126
10126
  this.writeInt64(value, true);
@@ -10128,7 +10128,7 @@ function applyBinaryAliasWriter(Base) {
10128
10128
  /**
10129
10129
  * Write signed 64 bit integer.
10130
10130
  *
10131
- * @param {number} value - value as int
10131
+ * @param {number|bigint} value - value as int
10132
10132
  */
10133
10133
  set int64le(value) {
10134
10134
  this.writeInt64(value, false, "little");
@@ -10136,7 +10136,7 @@ function applyBinaryAliasWriter(Base) {
10136
10136
  /**
10137
10137
  * Write signed 64 bit integer.
10138
10138
  *
10139
- * @param {number} value - value as int
10139
+ * @param {number|bigint} value - value as int
10140
10140
  */
10141
10141
  set bigintle(value) {
10142
10142
  this.writeInt64(value, false, "little");
@@ -10144,7 +10144,7 @@ function applyBinaryAliasWriter(Base) {
10144
10144
  /**
10145
10145
  * Write signed 64 bit integer.
10146
10146
  *
10147
- * @param {number} value - value as int
10147
+ * @param {number|bigint} value - value as int
10148
10148
  */
10149
10149
  set quadle(value) {
10150
10150
  this.writeInt64(value, false, "little");
@@ -10152,7 +10152,7 @@ function applyBinaryAliasWriter(Base) {
10152
10152
  /**
10153
10153
  * Write unsigned 64 bit integer.
10154
10154
  *
10155
- * @param {number} value - value as int
10155
+ * @param {number|bigint} value - value as int
10156
10156
  */
10157
10157
  set uint64le(value) {
10158
10158
  this.writeInt64(value, true, "little");
@@ -10160,7 +10160,7 @@ function applyBinaryAliasWriter(Base) {
10160
10160
  /**
10161
10161
  * Write unsigned 64 bit integer.
10162
10162
  *
10163
- * @param {number} value - value as int
10163
+ * @param {number|bigint} value - value as int
10164
10164
  */
10165
10165
  set ubigintle(value) {
10166
10166
  this.writeInt64(value, true, "little");
@@ -10168,7 +10168,7 @@ function applyBinaryAliasWriter(Base) {
10168
10168
  /**
10169
10169
  * Write unsigned 64 bit integer.
10170
10170
  *
10171
- * @param {number} value - value as int
10171
+ * @param {number|bigint} value - value as int
10172
10172
  */
10173
10173
  set uquadle(value) {
10174
10174
  this.writeInt64(value, true, "little");
@@ -10176,7 +10176,7 @@ function applyBinaryAliasWriter(Base) {
10176
10176
  /**
10177
10177
  * Write signed 64 bit integer.
10178
10178
  *
10179
- * @param {number} value - value as int
10179
+ * @param {number|bigint} value - value as int
10180
10180
  */
10181
10181
  set int64be(value) {
10182
10182
  this.writeInt64(value, false, "big");
@@ -10184,7 +10184,7 @@ function applyBinaryAliasWriter(Base) {
10184
10184
  /**
10185
10185
  * Write signed 64 bit integer.
10186
10186
  *
10187
- * @param {number} value - value as int
10187
+ * @param {number|bigint} value - value as int
10188
10188
  */
10189
10189
  set bigintbe(value) {
10190
10190
  this.writeInt64(value, false, "big");
@@ -10192,7 +10192,7 @@ function applyBinaryAliasWriter(Base) {
10192
10192
  /**
10193
10193
  * Write signed 64 bit integer.
10194
10194
  *
10195
- * @param {number} value - value as int
10195
+ * @param {number|bigint} value - value as int
10196
10196
  */
10197
10197
  set quadbe(value) {
10198
10198
  this.writeInt64(value, false, "big");
@@ -10200,7 +10200,7 @@ function applyBinaryAliasWriter(Base) {
10200
10200
  /**
10201
10201
  * Write unsigned 64 bit integer.
10202
10202
  *
10203
- * @param {number} value - value as int
10203
+ * @param {number|bigint} value - value as int
10204
10204
  */
10205
10205
  set uint64be(value) {
10206
10206
  this.writeInt64(value, true, "big");
@@ -10208,7 +10208,7 @@ function applyBinaryAliasWriter(Base) {
10208
10208
  /**
10209
10209
  * Write unsigned 64 bit integer.
10210
10210
  *
10211
- * @param {number} value - value as int
10211
+ * @param {number|bigint} value - value as int
10212
10212
  */
10213
10213
  set ubigintbe(value) {
10214
10214
  this.writeInt64(value, true, "big");
@@ -10216,7 +10216,7 @@ function applyBinaryAliasWriter(Base) {
10216
10216
  /**
10217
10217
  * Write unsigned 64 bit integer.
10218
10218
  *
10219
- * @param {number} value - value as int
10219
+ * @param {number|bigint} value - value as int
10220
10220
  */
10221
10221
  set uquadbe(value) {
10222
10222
  this.writeInt64(value, true, "big");
@@ -14057,7 +14057,7 @@ class BiBaseStreamer {
14057
14057
  *
14058
14058
  * Does not change current read position.
14059
14059
  *
14060
- * @param {number} value - Number to search for.
14060
+ * @param {BigValue} value - Number to search for.
14061
14061
  * @param {boolean} unsigned - If the number is unsigned (default true)
14062
14062
  * @param {endian} endian - endianness of value (default set endian).
14063
14063
  */
@@ -15227,7 +15227,7 @@ class BiBaseStreamer {
15227
15227
  *
15228
15228
  * @param {boolean} unsigned - if value is unsigned or not
15229
15229
  * @param {endian?} endian - ``big`` or ``little``
15230
- * @returns {number}
15230
+ * @returns {bigint}
15231
15231
  */
15232
15232
  readInt64(unsigned, endian) {
15233
15233
  return rint64(this, unsigned, endian);
@@ -15235,7 +15235,7 @@ class BiBaseStreamer {
15235
15235
  /**
15236
15236
  * Write 64 bit integer.
15237
15237
  *
15238
- * @param {number} value - value as int
15238
+ * @param {BigValue} value - value as int
15239
15239
  * @param {boolean} unsigned - if the value is unsigned
15240
15240
  * @param {endian} endian - ``big`` or ``little``
15241
15241
  */
@@ -15245,7 +15245,7 @@ class BiBaseStreamer {
15245
15245
  /**
15246
15246
  * Write unsigned 64 bit integer.
15247
15247
  *
15248
- * @param {number} value - value as int
15248
+ * @param {BigValue} value - value as int
15249
15249
  * @param {endian} endian - ``big`` or ``little``
15250
15250
  */
15251
15251
  writeUInt64(value, endian) {
@@ -15254,7 +15254,7 @@ class BiBaseStreamer {
15254
15254
  /**
15255
15255
  * Write signed 64 bit integer.
15256
15256
  *
15257
- * @param {number} value - value as int
15257
+ * @param {BigValue} value - value as int
15258
15258
  */
15259
15259
  writeInt64LE(value) {
15260
15260
  return this.writeInt64(value, false, "little");
@@ -15262,7 +15262,7 @@ class BiBaseStreamer {
15262
15262
  /**
15263
15263
  * Write unsigned 64 bit integer.
15264
15264
  *
15265
- * @param {number} value - value as int
15265
+ * @param {BigValue} value - value as int
15266
15266
  */
15267
15267
  writeUInt64LE(value) {
15268
15268
  return this.writeInt64(value, true, "little");
@@ -15270,7 +15270,7 @@ class BiBaseStreamer {
15270
15270
  /**
15271
15271
  * Write signed 64 bit integer.
15272
15272
  *
15273
- * @param {number} value - value as int
15273
+ * @param {BigValue} value - value as int
15274
15274
  */
15275
15275
  writeInt64BE(value) {
15276
15276
  return this.writeInt64(value, false, "big");
@@ -15278,7 +15278,7 @@ class BiBaseStreamer {
15278
15278
  /**
15279
15279
  * Write unsigned 64 bit integer.
15280
15280
  *
15281
- * @param {number} value - value as int
15281
+ * @param {BigValue} value - value as int
15282
15282
  */
15283
15283
  writeUInt64BE(value) {
15284
15284
  return this.writeInt64(value, true, "big");
@@ -15286,7 +15286,7 @@ class BiBaseStreamer {
15286
15286
  /**
15287
15287
  * Read unsigned 64 bit integer.
15288
15288
  *
15289
- * @returns {number}
15289
+ * @returns {bigint}
15290
15290
  */
15291
15291
  readUInt64() {
15292
15292
  return this.readInt64(true);
@@ -15294,7 +15294,7 @@ class BiBaseStreamer {
15294
15294
  /**
15295
15295
  * Read signed 64 bit integer.
15296
15296
  *
15297
- * @returns {number}
15297
+ * @returns {bigint}
15298
15298
  */
15299
15299
  readInt64BE() {
15300
15300
  return this.readInt64(false, "big");
@@ -15302,7 +15302,7 @@ class BiBaseStreamer {
15302
15302
  /**
15303
15303
  * Read unsigned 64 bit integer.
15304
15304
  *
15305
- * @returns {number}
15305
+ * @returns {bigint}
15306
15306
  */
15307
15307
  readUInt64BE() {
15308
15308
  return this.readInt64(true, "big");
@@ -15310,7 +15310,7 @@ class BiBaseStreamer {
15310
15310
  /**
15311
15311
  * Read signed 64 bit integer.
15312
15312
  *
15313
- * @returns {number}
15313
+ * @returns {bigint}
15314
15314
  */
15315
15315
  readInt64LE() {
15316
15316
  return this.readInt64(false, "little");
@@ -15318,7 +15318,7 @@ class BiBaseStreamer {
15318
15318
  /**
15319
15319
  * Read unsigned 64 bit integer.
15320
15320
  *
15321
- * @returns {number}
15321
+ * @returns {bigint}
15322
15322
  */
15323
15323
  readUInt64LE() {
15324
15324
  return this.readInt64(true, "little");