bireader 1.0.38 → 1.0.39
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/lib/cjs/index.d.ts +174 -175
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +174 -175
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.d.ts +174 -175
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +174 -175
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -1394,10 +1394,10 @@ function wstring(_this, string, options) {
|
|
|
1394
1394
|
/**
|
|
1395
1395
|
* Binary reader, includes bitfields and strings
|
|
1396
1396
|
*
|
|
1397
|
-
* @param {Buffer|Uint8Array} data -
|
|
1397
|
+
* @param {Buffer|Uint8Array} data - ``Buffer`` or ``Uint8Array``. Always found in ``biwriter.data``
|
|
1398
1398
|
* @param {number} byteOffset - Byte offset to start reader (default 0)
|
|
1399
1399
|
* @param {number} bitOffset - Bit offset 0-7 to start reader (default 0)
|
|
1400
|
-
* @param {string} endianness - Endianness
|
|
1400
|
+
* @param {string} endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
1401
1401
|
* @param {boolean} strict - Strict mode: if true does not extend supplied array on outside write (default true)
|
|
1402
1402
|
*/
|
|
1403
1403
|
class bireader {
|
|
@@ -1410,10 +1410,10 @@ class bireader {
|
|
|
1410
1410
|
/**
|
|
1411
1411
|
* Binary reader, includes bitfields and strings
|
|
1412
1412
|
*
|
|
1413
|
-
* @param {Buffer|Uint8Array} data -
|
|
1413
|
+
* @param {Buffer|Uint8Array} data - ``Buffer`` or ``Uint8Array``. Always found in ``biwriter.data``
|
|
1414
1414
|
* @param {number} byteOffset - Byte offset to start reader (default 0)
|
|
1415
1415
|
* @param {number} bitOffset - Bit offset 0-7 to start reader (default 0)
|
|
1416
|
-
* @param {string} endianness - Endianness
|
|
1416
|
+
* @param {string} endianness - Endianness ``big`` or ``little`` (default ``little``)
|
|
1417
1417
|
* @param {boolean} strict - Strict mode: if true does not extend supplied array on outside write (default true)
|
|
1418
1418
|
*/
|
|
1419
1419
|
constructor(data, byteOffset, bitOffset, endianness, strict) {
|
|
@@ -1467,7 +1467,7 @@ class bireader {
|
|
|
1467
1467
|
*
|
|
1468
1468
|
* Can be changed at any time, doesn't loose position
|
|
1469
1469
|
*
|
|
1470
|
-
* @param {string} endian - endianness
|
|
1470
|
+
* @param {string} endian - endianness ``big`` or ``little``
|
|
1471
1471
|
*/
|
|
1472
1472
|
endianness(endian) {
|
|
1473
1473
|
if (endian == undefined || typeof endian != "string") {
|
|
@@ -2094,7 +2094,7 @@ class bireader {
|
|
|
2094
2094
|
* @param {number} endOffset - End location (default end of data)
|
|
2095
2095
|
* @param {boolean} consume - Move position to end of lifted data (default false)
|
|
2096
2096
|
* @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
|
|
2097
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
2097
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
2098
2098
|
*/
|
|
2099
2099
|
lift(startOffset, endOffset, consume, fillValue) {
|
|
2100
2100
|
return remove(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
@@ -2106,7 +2106,7 @@ class bireader {
|
|
|
2106
2106
|
* @param {number} endOffset - End location (default end of data)
|
|
2107
2107
|
* @param {boolean} consume - Move position to end of lifted data (default false)
|
|
2108
2108
|
* @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
|
|
2109
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
2109
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
2110
2110
|
*/
|
|
2111
2111
|
fill(startOffset, endOffset, consume, fillValue) {
|
|
2112
2112
|
return remove(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
@@ -2117,7 +2117,7 @@ class bireader {
|
|
|
2117
2117
|
*
|
|
2118
2118
|
* @param {number} length - Length of data in bytes to copy from current offset
|
|
2119
2119
|
* @param {number} consume - Moves offset to end of length
|
|
2120
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
2120
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
2121
2121
|
*/
|
|
2122
2122
|
extract(length, consume) {
|
|
2123
2123
|
return remove(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
@@ -2128,7 +2128,7 @@ class bireader {
|
|
|
2128
2128
|
*
|
|
2129
2129
|
* @param {number} length - Length of data in bytes to copy from current offset
|
|
2130
2130
|
* @param {number} consume - Moves offset to end of length
|
|
2131
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
2131
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
2132
2132
|
*/
|
|
2133
2133
|
slice(length, consume) {
|
|
2134
2134
|
return remove(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
@@ -2139,7 +2139,7 @@ class bireader {
|
|
|
2139
2139
|
*
|
|
2140
2140
|
* @param {number} length - Length of data in bytes to copy from current offset
|
|
2141
2141
|
* @param {number} consume - Moves offset to end of length
|
|
2142
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
2142
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
2143
2143
|
*/
|
|
2144
2144
|
wrap(length, consume) {
|
|
2145
2145
|
return remove(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
@@ -2151,7 +2151,7 @@ class bireader {
|
|
|
2151
2151
|
* Inserts data into data
|
|
2152
2152
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2153
2153
|
*
|
|
2154
|
-
* @param {Buffer|Uint8Array} data -
|
|
2154
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
2155
2155
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
2156
2156
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
2157
2157
|
*/
|
|
@@ -2162,7 +2162,7 @@ class bireader {
|
|
|
2162
2162
|
* Inserts data into data
|
|
2163
2163
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2164
2164
|
*
|
|
2165
|
-
* @param {Buffer|Uint8Array} data -
|
|
2165
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
2166
2166
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
2167
2167
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
2168
2168
|
*/
|
|
@@ -2173,7 +2173,7 @@ class bireader {
|
|
|
2173
2173
|
* Replaces data in data
|
|
2174
2174
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2175
2175
|
*
|
|
2176
|
-
* @param {Buffer|Uint8Array} data -
|
|
2176
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to replace in data
|
|
2177
2177
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
2178
2178
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
2179
2179
|
*/
|
|
@@ -2184,7 +2184,7 @@ class bireader {
|
|
|
2184
2184
|
* Replaces data in data
|
|
2185
2185
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2186
2186
|
*
|
|
2187
|
-
* @param {Buffer|Uint8Array} data -
|
|
2187
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to replace in data
|
|
2188
2188
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
2189
2189
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
2190
2190
|
*/
|
|
@@ -2195,7 +2195,7 @@ class bireader {
|
|
|
2195
2195
|
* Adds data to start of supplied data
|
|
2196
2196
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2197
2197
|
*
|
|
2198
|
-
* @param {Buffer|Uint8Array} data -
|
|
2198
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
2199
2199
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
2200
2200
|
*/
|
|
2201
2201
|
unshift(data, consume) {
|
|
@@ -2205,7 +2205,7 @@ class bireader {
|
|
|
2205
2205
|
* Adds data to start of supplied data
|
|
2206
2206
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2207
2207
|
*
|
|
2208
|
-
* @param {Buffer|Uint8Array} data -
|
|
2208
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
2209
2209
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
2210
2210
|
*/
|
|
2211
2211
|
prepend(data, consume) {
|
|
@@ -2215,7 +2215,7 @@ class bireader {
|
|
|
2215
2215
|
* Adds data to end of supplied data
|
|
2216
2216
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2217
2217
|
*
|
|
2218
|
-
* @param {Buffer|Uint8Array} data -
|
|
2218
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
2219
2219
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
2220
2220
|
*/
|
|
2221
2221
|
push(data, consume) {
|
|
@@ -2225,7 +2225,7 @@ class bireader {
|
|
|
2225
2225
|
* Adds data to end of supplied data
|
|
2226
2226
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
2227
2227
|
*
|
|
2228
|
-
* @param {Buffer|Uint8Array} data -
|
|
2228
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
2229
2229
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
2230
2230
|
*/
|
|
2231
2231
|
append(data, consume) {
|
|
@@ -2325,7 +2325,7 @@ class bireader {
|
|
|
2325
2325
|
*
|
|
2326
2326
|
* @param {number} bits - bits to read
|
|
2327
2327
|
* @param {boolean} unsigned - if the value is unsigned
|
|
2328
|
-
* @param {string} endian - ``big`` or ``little
|
|
2328
|
+
* @param {string} endian - ``big`` or ``little``
|
|
2329
2329
|
* @returns number
|
|
2330
2330
|
*/
|
|
2331
2331
|
readBit(bits, unsigned, endian) {
|
|
@@ -2338,7 +2338,7 @@ class bireader {
|
|
|
2338
2338
|
*
|
|
2339
2339
|
* @param {number} bits - bits to read
|
|
2340
2340
|
* @param {boolean} unsigned - if the value is unsigned
|
|
2341
|
-
* @param {string} endian - ``big`` or ``little
|
|
2341
|
+
* @param {string} endian - ``big`` or ``little``
|
|
2342
2342
|
* @returns number
|
|
2343
2343
|
*/
|
|
2344
2344
|
bit(bits, unsigned, endian) {
|
|
@@ -2350,7 +2350,7 @@ class bireader {
|
|
|
2350
2350
|
* Note: When returning to a byte read, remaining bits are dropped
|
|
2351
2351
|
*
|
|
2352
2352
|
* @param {number} bits - bits to read
|
|
2353
|
-
* @param {string} endian - ``big`` or ``little
|
|
2353
|
+
* @param {string} endian - ``big`` or ``little``
|
|
2354
2354
|
* @returns number
|
|
2355
2355
|
*/
|
|
2356
2356
|
ubit(bits, endian) {
|
|
@@ -2362,7 +2362,7 @@ class bireader {
|
|
|
2362
2362
|
* Note: When returning to a byte read, remaining bits are dropped
|
|
2363
2363
|
*
|
|
2364
2364
|
* @param {boolean} unsigned - if the value is unsigned
|
|
2365
|
-
* @param {string} endian - ``big`` or ``little
|
|
2365
|
+
* @param {string} endian - ``big`` or ``little``
|
|
2366
2366
|
* @returns number
|
|
2367
2367
|
*/
|
|
2368
2368
|
bit1(unsigned, endian) {
|
|
@@ -4543,7 +4543,7 @@ class bireader {
|
|
|
4543
4543
|
* Read short
|
|
4544
4544
|
*
|
|
4545
4545
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4546
|
-
* @param {string} endian -
|
|
4546
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4547
4547
|
* @returns number
|
|
4548
4548
|
*/
|
|
4549
4549
|
readInt16(unsigned, endian) {
|
|
@@ -4554,7 +4554,7 @@ class bireader {
|
|
|
4554
4554
|
*
|
|
4555
4555
|
* @param {number} value - value as int
|
|
4556
4556
|
* @param {boolean} unsigned - if the value is unsigned
|
|
4557
|
-
* @param {string} endian - ``big`` or ``little
|
|
4557
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4558
4558
|
*/
|
|
4559
4559
|
writeInt16(value, unsigned, endian) {
|
|
4560
4560
|
return wint16(this, value, unsigned, endian);
|
|
@@ -4563,7 +4563,7 @@ class bireader {
|
|
|
4563
4563
|
* Write unsigned int16
|
|
4564
4564
|
*
|
|
4565
4565
|
* @param {number} value - value as int
|
|
4566
|
-
* @param {string} endian - ``big`` or ``little
|
|
4566
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4567
4567
|
*/
|
|
4568
4568
|
writeUInt16(value, endian) {
|
|
4569
4569
|
return wint16(this, value, true, endian);
|
|
@@ -4572,7 +4572,7 @@ class bireader {
|
|
|
4572
4572
|
* Read short
|
|
4573
4573
|
*
|
|
4574
4574
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4575
|
-
* @param {string} endian -
|
|
4575
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4576
4576
|
* @returns number
|
|
4577
4577
|
*/
|
|
4578
4578
|
int16(unsigned, endian) {
|
|
@@ -4582,7 +4582,7 @@ class bireader {
|
|
|
4582
4582
|
* Read short
|
|
4583
4583
|
*
|
|
4584
4584
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4585
|
-
* @param {string} endian -
|
|
4585
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4586
4586
|
* @returns number
|
|
4587
4587
|
*/
|
|
4588
4588
|
short(unsigned, endian) {
|
|
@@ -4592,7 +4592,7 @@ class bireader {
|
|
|
4592
4592
|
* Read short
|
|
4593
4593
|
*
|
|
4594
4594
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4595
|
-
* @param {string} endian -
|
|
4595
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4596
4596
|
* @returns number
|
|
4597
4597
|
*/
|
|
4598
4598
|
word(unsigned, endian) {
|
|
@@ -4601,7 +4601,7 @@ class bireader {
|
|
|
4601
4601
|
/**
|
|
4602
4602
|
* Read unsigned short
|
|
4603
4603
|
*
|
|
4604
|
-
* @param {string} endian -
|
|
4604
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4605
4605
|
*
|
|
4606
4606
|
* @returns number
|
|
4607
4607
|
*/
|
|
@@ -4611,7 +4611,7 @@ class bireader {
|
|
|
4611
4611
|
/**
|
|
4612
4612
|
* Read unsigned short
|
|
4613
4613
|
*
|
|
4614
|
-
* @param {string} endian -
|
|
4614
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4615
4615
|
*
|
|
4616
4616
|
* @returns number
|
|
4617
4617
|
*/
|
|
@@ -4621,7 +4621,7 @@ class bireader {
|
|
|
4621
4621
|
/**
|
|
4622
4622
|
* Read unsigned short
|
|
4623
4623
|
*
|
|
4624
|
-
* @param {string} endian -
|
|
4624
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4625
4625
|
*
|
|
4626
4626
|
* @returns number
|
|
4627
4627
|
*/
|
|
@@ -4631,7 +4631,7 @@ class bireader {
|
|
|
4631
4631
|
/**
|
|
4632
4632
|
* Read unsigned short
|
|
4633
4633
|
*
|
|
4634
|
-
* @param {string} endian -
|
|
4634
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4635
4635
|
*
|
|
4636
4636
|
* @returns number
|
|
4637
4637
|
*/
|
|
@@ -4772,7 +4772,7 @@ class bireader {
|
|
|
4772
4772
|
/**
|
|
4773
4773
|
* Read half float
|
|
4774
4774
|
*
|
|
4775
|
-
* @param {string} endian -
|
|
4775
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4776
4776
|
* @returns number
|
|
4777
4777
|
*/
|
|
4778
4778
|
readHalfFloat(endian) {
|
|
@@ -4782,7 +4782,7 @@ class bireader {
|
|
|
4782
4782
|
* Writes half float
|
|
4783
4783
|
*
|
|
4784
4784
|
* @param {number} value - value as int
|
|
4785
|
-
* @param {string} endian - ``big`` or ``little
|
|
4785
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4786
4786
|
*/
|
|
4787
4787
|
writeHalfFloat(value, endian) {
|
|
4788
4788
|
return whalffloat(this, value, endian);
|
|
@@ -4790,7 +4790,7 @@ class bireader {
|
|
|
4790
4790
|
/**
|
|
4791
4791
|
* Read half float
|
|
4792
4792
|
*
|
|
4793
|
-
* @param {string} endian -
|
|
4793
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4794
4794
|
* @returns number
|
|
4795
4795
|
*/
|
|
4796
4796
|
halffloat(endian) {
|
|
@@ -4799,7 +4799,7 @@ class bireader {
|
|
|
4799
4799
|
/**
|
|
4800
4800
|
* Read half float
|
|
4801
4801
|
*
|
|
4802
|
-
* @param {string} endian -
|
|
4802
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4803
4803
|
* @returns number
|
|
4804
4804
|
*/
|
|
4805
4805
|
half(endian) {
|
|
@@ -4860,7 +4860,7 @@ class bireader {
|
|
|
4860
4860
|
* Read 32 bit integer
|
|
4861
4861
|
*
|
|
4862
4862
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4863
|
-
* @param {string} endian -
|
|
4863
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4864
4864
|
* @returns number
|
|
4865
4865
|
*/
|
|
4866
4866
|
readInt32(unsigned, endian) {
|
|
@@ -4871,7 +4871,7 @@ class bireader {
|
|
|
4871
4871
|
*
|
|
4872
4872
|
* @param {number} value - value as int
|
|
4873
4873
|
* @param {boolean} unsigned - if the value is unsigned
|
|
4874
|
-
* @param {string} endian - ``big`` or ``little
|
|
4874
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4875
4875
|
*/
|
|
4876
4876
|
writeInt32(value, unsigned, endian) {
|
|
4877
4877
|
return wint32(this, value, unsigned, endian);
|
|
@@ -4889,7 +4889,7 @@ class bireader {
|
|
|
4889
4889
|
* Read 32 bit integer
|
|
4890
4890
|
*
|
|
4891
4891
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4892
|
-
* @param {string} endian -
|
|
4892
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4893
4893
|
* @returns number
|
|
4894
4894
|
*/
|
|
4895
4895
|
int(unsigned, endian) {
|
|
@@ -4899,7 +4899,7 @@ class bireader {
|
|
|
4899
4899
|
* Read 32 bit integer
|
|
4900
4900
|
*
|
|
4901
4901
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4902
|
-
* @param {string} endian -
|
|
4902
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4903
4903
|
* @returns number
|
|
4904
4904
|
*/
|
|
4905
4905
|
double(unsigned, endian) {
|
|
@@ -4909,7 +4909,7 @@ class bireader {
|
|
|
4909
4909
|
* Read 32 bit integer
|
|
4910
4910
|
*
|
|
4911
4911
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4912
|
-
* @param {string} endian -
|
|
4912
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4913
4913
|
* @returns number
|
|
4914
4914
|
*/
|
|
4915
4915
|
int32(unsigned, endian) {
|
|
@@ -4919,7 +4919,7 @@ class bireader {
|
|
|
4919
4919
|
* Read 32 bit integer
|
|
4920
4920
|
*
|
|
4921
4921
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
4922
|
-
* @param {string} endian -
|
|
4922
|
+
* @param {string} endian - ``big`` or ``little``
|
|
4923
4923
|
* @returns number
|
|
4924
4924
|
*/
|
|
4925
4925
|
long(unsigned, endian) {
|
|
@@ -5131,25 +5131,25 @@ class bireader {
|
|
|
5131
5131
|
/**
|
|
5132
5132
|
* Read float
|
|
5133
5133
|
*
|
|
5134
|
-
* @param {string} endian -
|
|
5134
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5135
5135
|
* @returns number
|
|
5136
5136
|
*/
|
|
5137
5137
|
readFloat(endian) {
|
|
5138
5138
|
return rfloat(this, endian);
|
|
5139
5139
|
}
|
|
5140
5140
|
/**
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5141
|
+
* Write float
|
|
5142
|
+
*
|
|
5143
|
+
* @param {number} value - value as int
|
|
5144
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5145
|
+
*/
|
|
5146
5146
|
writeFloat(value, endian) {
|
|
5147
5147
|
return wfloat(this, value, endian);
|
|
5148
5148
|
}
|
|
5149
5149
|
/**
|
|
5150
5150
|
* Read float
|
|
5151
5151
|
*
|
|
5152
|
-
* @param {string} endian -
|
|
5152
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5153
5153
|
* @returns number
|
|
5154
5154
|
*/
|
|
5155
5155
|
float(endian) {
|
|
@@ -5193,7 +5193,7 @@ class bireader {
|
|
|
5193
5193
|
/**
|
|
5194
5194
|
* Read signed 64 bit integer
|
|
5195
5195
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
5196
|
-
* @param {string} endian -
|
|
5196
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5197
5197
|
* @returns number
|
|
5198
5198
|
*/
|
|
5199
5199
|
readInt64(unsigned, endian) {
|
|
@@ -5204,7 +5204,7 @@ class bireader {
|
|
|
5204
5204
|
*
|
|
5205
5205
|
* @param {number} value - value as int
|
|
5206
5206
|
* @param {boolean} unsigned - if the value is unsigned
|
|
5207
|
-
* @param {string} endian - ``big`` or ``little
|
|
5207
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5208
5208
|
*/
|
|
5209
5209
|
writeInt64(value, unsigned, endian) {
|
|
5210
5210
|
return wint64(this, value, unsigned, endian);
|
|
@@ -5212,7 +5212,7 @@ class bireader {
|
|
|
5212
5212
|
/**
|
|
5213
5213
|
* Read signed 64 bit integer
|
|
5214
5214
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
5215
|
-
* @param {string} endian -
|
|
5215
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5216
5216
|
* @returns number
|
|
5217
5217
|
*/
|
|
5218
5218
|
int64(unsigned, endian) {
|
|
@@ -5221,7 +5221,7 @@ class bireader {
|
|
|
5221
5221
|
/**
|
|
5222
5222
|
* Read signed 64 bit integer
|
|
5223
5223
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
5224
|
-
* @param {string} endian -
|
|
5224
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5225
5225
|
* @returns number
|
|
5226
5226
|
*/
|
|
5227
5227
|
bigint(unsigned, endian) {
|
|
@@ -5230,7 +5230,7 @@ class bireader {
|
|
|
5230
5230
|
/**
|
|
5231
5231
|
* Read signed 64 bit integer
|
|
5232
5232
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
5233
|
-
* @param {string} endian -
|
|
5233
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5234
5234
|
* @returns number
|
|
5235
5235
|
*/
|
|
5236
5236
|
quad(unsigned, endian) {
|
|
@@ -5402,7 +5402,7 @@ class bireader {
|
|
|
5402
5402
|
/**
|
|
5403
5403
|
* Read double float
|
|
5404
5404
|
*
|
|
5405
|
-
* @param {string} endian -
|
|
5405
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5406
5406
|
* @returns number
|
|
5407
5407
|
*/
|
|
5408
5408
|
readDoubleFloat(endian) {
|
|
@@ -5413,7 +5413,7 @@ class bireader {
|
|
|
5413
5413
|
*
|
|
5414
5414
|
* @param {number} value - value as int
|
|
5415
5415
|
* @param {number} offset - byte offset (default last write position)
|
|
5416
|
-
* @param {string} endian - ``big`` or ``little
|
|
5416
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5417
5417
|
*/
|
|
5418
5418
|
writeDoubleFloat(value, endian) {
|
|
5419
5419
|
return wdfloat(this, value, endian);
|
|
@@ -5421,7 +5421,7 @@ class bireader {
|
|
|
5421
5421
|
/**
|
|
5422
5422
|
* Read double float
|
|
5423
5423
|
*
|
|
5424
|
-
* @param {string} endian -
|
|
5424
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5425
5425
|
* @returns number
|
|
5426
5426
|
*/
|
|
5427
5427
|
doublefloat(endian) {
|
|
@@ -5430,7 +5430,7 @@ class bireader {
|
|
|
5430
5430
|
/**
|
|
5431
5431
|
* Read double float
|
|
5432
5432
|
*
|
|
5433
|
-
* @param {string} endian -
|
|
5433
|
+
* @param {string} endian - ``big`` or ``little``
|
|
5434
5434
|
* @returns number
|
|
5435
5435
|
*/
|
|
5436
5436
|
dfloat(endian) {
|
|
@@ -5924,7 +5924,7 @@ class biwriter {
|
|
|
5924
5924
|
*
|
|
5925
5925
|
* Can be changed at any time, doesn't loose position
|
|
5926
5926
|
*
|
|
5927
|
-
* @param {string} endian - Endianness
|
|
5927
|
+
* @param {string} endian - Endianness ``big`` or ``little``
|
|
5928
5928
|
*/
|
|
5929
5929
|
endianness(endian) {
|
|
5930
5930
|
if (endian == undefined || typeof endian != "string") {
|
|
@@ -6558,7 +6558,7 @@ class biwriter {
|
|
|
6558
6558
|
* @param {number} endOffset - End location (default end of data)
|
|
6559
6559
|
* @param {boolean} consume - Move position to end of lifted data (default false)
|
|
6560
6560
|
* @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
|
|
6561
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
6561
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
6562
6562
|
*/
|
|
6563
6563
|
lift(startOffset, endOffset, consume, fillValue) {
|
|
6564
6564
|
return remove(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
@@ -6570,7 +6570,7 @@ class biwriter {
|
|
|
6570
6570
|
* @param {number} endOffset - End location (default end of data)
|
|
6571
6571
|
* @param {boolean} consume - Move position to end of lifted data (default false)
|
|
6572
6572
|
* @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
|
|
6573
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
6573
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
6574
6574
|
*/
|
|
6575
6575
|
fill(startOffset, endOffset, consume, fillValue) {
|
|
6576
6576
|
return remove(this, startOffset || this.offset, endOffset || this.size, consume || false, false, fillValue);
|
|
@@ -6581,7 +6581,7 @@ class biwriter {
|
|
|
6581
6581
|
*
|
|
6582
6582
|
* @param {number} length - Length of data in bytes to copy from current offset
|
|
6583
6583
|
* @param {number} consume - Moves offset to end of length
|
|
6584
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
6584
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
6585
6585
|
*/
|
|
6586
6586
|
extract(length, consume) {
|
|
6587
6587
|
return remove(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
@@ -6592,7 +6592,7 @@ class biwriter {
|
|
|
6592
6592
|
*
|
|
6593
6593
|
* @param {number} length - Length of data in bytes to copy from current offset
|
|
6594
6594
|
* @param {number} consume - Moves offset to end of length
|
|
6595
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
6595
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
6596
6596
|
*/
|
|
6597
6597
|
slice(length, consume) {
|
|
6598
6598
|
return remove(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
@@ -6603,7 +6603,7 @@ class biwriter {
|
|
|
6603
6603
|
*
|
|
6604
6604
|
* @param {number} length - Length of data in bytes to copy from current offset
|
|
6605
6605
|
* @param {number} consume - Moves offset to end of length
|
|
6606
|
-
* @returns {Buffer|Uint8Array} Selected data as
|
|
6606
|
+
* @returns {Buffer|Uint8Array} Selected data as ``Uint8Array`` or ``Buffer``
|
|
6607
6607
|
*/
|
|
6608
6608
|
wrap(length, consume) {
|
|
6609
6609
|
return remove(this, this.offset, this.offset + (length || 0), consume || false, false);
|
|
@@ -6615,7 +6615,7 @@ class biwriter {
|
|
|
6615
6615
|
* Inserts data into data
|
|
6616
6616
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6617
6617
|
*
|
|
6618
|
-
* @param {Buffer|Uint8Array} data -
|
|
6618
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
6619
6619
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
6620
6620
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
6621
6621
|
*/
|
|
@@ -6626,7 +6626,7 @@ class biwriter {
|
|
|
6626
6626
|
* Inserts data into data
|
|
6627
6627
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6628
6628
|
*
|
|
6629
|
-
* @param {Buffer|Uint8Array} data -
|
|
6629
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
6630
6630
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
6631
6631
|
* @param {number} offset - Byte position to add at (defaults to current position)
|
|
6632
6632
|
*/
|
|
@@ -6637,7 +6637,7 @@ class biwriter {
|
|
|
6637
6637
|
* Replaces data in data
|
|
6638
6638
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6639
6639
|
*
|
|
6640
|
-
* @param {Buffer|Uint8Array} data -
|
|
6640
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to replace in data
|
|
6641
6641
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
6642
6642
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
6643
6643
|
*/
|
|
@@ -6648,7 +6648,7 @@ class biwriter {
|
|
|
6648
6648
|
* Replaces data in data
|
|
6649
6649
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6650
6650
|
*
|
|
6651
|
-
* @param {Buffer|Uint8Array} data -
|
|
6651
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to replace in data
|
|
6652
6652
|
* @param {boolean} consume - Move current byte position to end of data (default false)
|
|
6653
6653
|
* @param {number} offset - Offset to add it at (defaults to current position)
|
|
6654
6654
|
*/
|
|
@@ -6659,7 +6659,7 @@ class biwriter {
|
|
|
6659
6659
|
* Adds data to start of supplied data
|
|
6660
6660
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6661
6661
|
*
|
|
6662
|
-
* @param {Buffer|Uint8Array} data -
|
|
6662
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
6663
6663
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
6664
6664
|
*/
|
|
6665
6665
|
unshift(data, consume) {
|
|
@@ -6669,7 +6669,7 @@ class biwriter {
|
|
|
6669
6669
|
* Adds data to start of supplied data
|
|
6670
6670
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6671
6671
|
*
|
|
6672
|
-
* @param {Buffer|Uint8Array} data -
|
|
6672
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
6673
6673
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
6674
6674
|
*/
|
|
6675
6675
|
prepend(data, consume) {
|
|
@@ -6679,7 +6679,7 @@ class biwriter {
|
|
|
6679
6679
|
* Adds data to end of supplied data
|
|
6680
6680
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6681
6681
|
*
|
|
6682
|
-
* @param {Buffer|Uint8Array} data -
|
|
6682
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
6683
6683
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
6684
6684
|
*/
|
|
6685
6685
|
push(data, consume) {
|
|
@@ -6689,7 +6689,7 @@ class biwriter {
|
|
|
6689
6689
|
* Adds data to end of supplied data
|
|
6690
6690
|
* Note: Must be same data type as supplied data. Errors on strict mode.
|
|
6691
6691
|
*
|
|
6692
|
-
* @param {Buffer|Uint8Array} data -
|
|
6692
|
+
* @param {Buffer|Uint8Array} data - ``Uint8Array`` or ``Buffer`` to add to data
|
|
6693
6693
|
* @param {boolean} consume - Move current write position to end of data (default false)
|
|
6694
6694
|
*/
|
|
6695
6695
|
append(data, consume) {
|
|
@@ -6789,7 +6789,7 @@ class biwriter {
|
|
|
6789
6789
|
*
|
|
6790
6790
|
* @param {number} bits - bits to read
|
|
6791
6791
|
* @param {boolean} unsigned - if the value is unsigned
|
|
6792
|
-
* @param {string} endian - ``big`` or ``little
|
|
6792
|
+
* @param {string} endian - ``big`` or ``little``
|
|
6793
6793
|
* @returns number
|
|
6794
6794
|
*/
|
|
6795
6795
|
readBit(bits, unsigned, endian) {
|
|
@@ -6803,7 +6803,7 @@ class biwriter {
|
|
|
6803
6803
|
* @param {number} value - value as int
|
|
6804
6804
|
* @param {number} bits - bits to write
|
|
6805
6805
|
* @param {boolean} unsigned - if the value is unsigned
|
|
6806
|
-
* @param {string} endian - ``big`` or ``little
|
|
6806
|
+
* @param {string} endian - ``big`` or ``little``
|
|
6807
6807
|
* @returns number
|
|
6808
6808
|
*/
|
|
6809
6809
|
bit(value, bits, unsigned, endian) {
|
|
@@ -6816,7 +6816,7 @@ class biwriter {
|
|
|
6816
6816
|
*
|
|
6817
6817
|
* @param {number} value - value as int
|
|
6818
6818
|
* @param {number} bits - bits to write
|
|
6819
|
-
* @param {string} endian - ``big`` or ``little
|
|
6819
|
+
* @param {string} endian - ``big`` or ``little``
|
|
6820
6820
|
* @returns number
|
|
6821
6821
|
*/
|
|
6822
6822
|
ubit(value, bits, endian) {
|
|
@@ -6929,7 +6929,7 @@ class biwriter {
|
|
|
6929
6929
|
*
|
|
6930
6930
|
* @param {number} value - value as int
|
|
6931
6931
|
* @param {boolean} unsigned - if the value is unsigned
|
|
6932
|
-
* @param {string} endian - ``big`` or ``little
|
|
6932
|
+
* @param {string} endian - ``big`` or ``little``
|
|
6933
6933
|
* @returns number
|
|
6934
6934
|
*/
|
|
6935
6935
|
bit1(value, unsigned, endian) {
|
|
@@ -6965,7 +6965,7 @@ class biwriter {
|
|
|
6965
6965
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
6966
6966
|
*
|
|
6967
6967
|
* @param {number} value - value as int
|
|
6968
|
-
* @param {string} endian - ``big`` or ``little
|
|
6968
|
+
* @param {string} endian - ``big`` or ``little``
|
|
6969
6969
|
* @returns number
|
|
6970
6970
|
*/
|
|
6971
6971
|
ubit1(value, endian) {
|
|
@@ -7000,7 +7000,7 @@ class biwriter {
|
|
|
7000
7000
|
*
|
|
7001
7001
|
* @param {number} value - value as int
|
|
7002
7002
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7003
|
-
* @param {string} endian - ``big`` or ``little
|
|
7003
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7004
7004
|
* @returns number
|
|
7005
7005
|
*/
|
|
7006
7006
|
bit2(value, unsigned, endian) {
|
|
@@ -7036,7 +7036,7 @@ class biwriter {
|
|
|
7036
7036
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7037
7037
|
*
|
|
7038
7038
|
* @param {number} value - value as int
|
|
7039
|
-
* @param {string} endian - ``big`` or ``little
|
|
7039
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7040
7040
|
* @returns number
|
|
7041
7041
|
*/
|
|
7042
7042
|
ubit2(value, endian) {
|
|
@@ -7071,7 +7071,7 @@ class biwriter {
|
|
|
7071
7071
|
*
|
|
7072
7072
|
* @param {number} value - value as int
|
|
7073
7073
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7074
|
-
* @param {string} endian - ``big`` or ``little
|
|
7074
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7075
7075
|
* @returns number
|
|
7076
7076
|
*/
|
|
7077
7077
|
bit3(value, unsigned, endian) {
|
|
@@ -7107,7 +7107,7 @@ class biwriter {
|
|
|
7107
7107
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7108
7108
|
*
|
|
7109
7109
|
* @param {number} value - value as int
|
|
7110
|
-
* @param {string} endian - ``big`` or ``little
|
|
7110
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7111
7111
|
* @returns number
|
|
7112
7112
|
*/
|
|
7113
7113
|
ubit3(value, endian) {
|
|
@@ -7142,7 +7142,7 @@ class biwriter {
|
|
|
7142
7142
|
*
|
|
7143
7143
|
* @param {number} value - value as int
|
|
7144
7144
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7145
|
-
* @param {string} endian - ``big`` or ``little
|
|
7145
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7146
7146
|
* @returns number
|
|
7147
7147
|
*/
|
|
7148
7148
|
bit4(value, unsigned, endian) {
|
|
@@ -7178,7 +7178,7 @@ class biwriter {
|
|
|
7178
7178
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7179
7179
|
*
|
|
7180
7180
|
* @param {number} value - value as int
|
|
7181
|
-
* @param {string} endian - ``big`` or ``little
|
|
7181
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7182
7182
|
* @returns number
|
|
7183
7183
|
*/
|
|
7184
7184
|
ubit4(value, endian) {
|
|
@@ -7213,7 +7213,7 @@ class biwriter {
|
|
|
7213
7213
|
*
|
|
7214
7214
|
* @param {number} value - value as int
|
|
7215
7215
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7216
|
-
* @param {string} endian - ``big`` or ``little
|
|
7216
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7217
7217
|
* @returns number
|
|
7218
7218
|
*/
|
|
7219
7219
|
bit5(value, unsigned, endian) {
|
|
@@ -7249,7 +7249,7 @@ class biwriter {
|
|
|
7249
7249
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7250
7250
|
*
|
|
7251
7251
|
* @param {number} value - value as int
|
|
7252
|
-
* @param {string} endian - ``big`` or ``little
|
|
7252
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7253
7253
|
* @returns number
|
|
7254
7254
|
*/
|
|
7255
7255
|
ubit5(value, endian) {
|
|
@@ -7284,7 +7284,7 @@ class biwriter {
|
|
|
7284
7284
|
*
|
|
7285
7285
|
* @param {number} value - value as int
|
|
7286
7286
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7287
|
-
* @param {string} endian - ``big`` or ``little
|
|
7287
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7288
7288
|
* @returns number
|
|
7289
7289
|
*/
|
|
7290
7290
|
bit6(value, unsigned, endian) {
|
|
@@ -7320,7 +7320,7 @@ class biwriter {
|
|
|
7320
7320
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7321
7321
|
*
|
|
7322
7322
|
* @param {number} value - value as int
|
|
7323
|
-
* @param {string} endian - ``big`` or ``little
|
|
7323
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7324
7324
|
* @returns number
|
|
7325
7325
|
*/
|
|
7326
7326
|
ubit6(value, endian) {
|
|
@@ -7355,7 +7355,7 @@ class biwriter {
|
|
|
7355
7355
|
*
|
|
7356
7356
|
* @param {number} value - value as int
|
|
7357
7357
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7358
|
-
* @param {string} endian - ``big`` or ``little
|
|
7358
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7359
7359
|
* @returns number
|
|
7360
7360
|
*/
|
|
7361
7361
|
bit7(value, unsigned, endian) {
|
|
@@ -7391,7 +7391,7 @@ class biwriter {
|
|
|
7391
7391
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7392
7392
|
*
|
|
7393
7393
|
* @param {number} value - value as int
|
|
7394
|
-
* @param {string} endian - ``big`` or ``little
|
|
7394
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7395
7395
|
* @returns number
|
|
7396
7396
|
*/
|
|
7397
7397
|
ubit7(value, endian) {
|
|
@@ -7426,7 +7426,7 @@ class biwriter {
|
|
|
7426
7426
|
*
|
|
7427
7427
|
* @param {number} value - value as int
|
|
7428
7428
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7429
|
-
* @param {string} endian - ``big`` or ``little
|
|
7429
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7430
7430
|
* @returns number
|
|
7431
7431
|
*/
|
|
7432
7432
|
bit8(value, unsigned, endian) {
|
|
@@ -7462,7 +7462,7 @@ class biwriter {
|
|
|
7462
7462
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7463
7463
|
*
|
|
7464
7464
|
* @param {number} value - value as int
|
|
7465
|
-
* @param {string} endian - ``big`` or ``little
|
|
7465
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7466
7466
|
* @returns number
|
|
7467
7467
|
*/
|
|
7468
7468
|
ubit8(value, endian) {
|
|
@@ -7497,7 +7497,7 @@ class biwriter {
|
|
|
7497
7497
|
*
|
|
7498
7498
|
* @param {number} value - value as int
|
|
7499
7499
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7500
|
-
* @param {string} endian - ``big`` or ``little
|
|
7500
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7501
7501
|
* @returns number
|
|
7502
7502
|
*/
|
|
7503
7503
|
bit9(value, unsigned, endian) {
|
|
@@ -7533,7 +7533,7 @@ class biwriter {
|
|
|
7533
7533
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7534
7534
|
*
|
|
7535
7535
|
* @param {number} value - value as int
|
|
7536
|
-
* @param {string} endian - ``big`` or ``little
|
|
7536
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7537
7537
|
* @returns number
|
|
7538
7538
|
*/
|
|
7539
7539
|
ubit9(value, endian) {
|
|
@@ -7568,7 +7568,7 @@ class biwriter {
|
|
|
7568
7568
|
*
|
|
7569
7569
|
* @param {number} value - value as int
|
|
7570
7570
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7571
|
-
* @param {string} endian - ``big`` or ``little
|
|
7571
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7572
7572
|
* @returns number
|
|
7573
7573
|
*/
|
|
7574
7574
|
bit10(value, unsigned, endian) {
|
|
@@ -7604,7 +7604,7 @@ class biwriter {
|
|
|
7604
7604
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7605
7605
|
*
|
|
7606
7606
|
* @param {number} value - value as int
|
|
7607
|
-
* @param {string} endian - ``big`` or ``little
|
|
7607
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7608
7608
|
* @returns number
|
|
7609
7609
|
*/
|
|
7610
7610
|
ubit10(value, endian) {
|
|
@@ -7639,7 +7639,7 @@ class biwriter {
|
|
|
7639
7639
|
*
|
|
7640
7640
|
* @param {number} value - value as int
|
|
7641
7641
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7642
|
-
* @param {string} endian - ``big`` or ``little
|
|
7642
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7643
7643
|
* @returns number
|
|
7644
7644
|
*/
|
|
7645
7645
|
bit11(value, unsigned, endian) {
|
|
@@ -7675,7 +7675,7 @@ class biwriter {
|
|
|
7675
7675
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7676
7676
|
*
|
|
7677
7677
|
* @param {number} value - value as int
|
|
7678
|
-
* @param {string} endian - ``big`` or ``little
|
|
7678
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7679
7679
|
* @returns number
|
|
7680
7680
|
*/
|
|
7681
7681
|
ubit11(value, endian) {
|
|
@@ -7710,7 +7710,7 @@ class biwriter {
|
|
|
7710
7710
|
*
|
|
7711
7711
|
* @param {number} value - value as int
|
|
7712
7712
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7713
|
-
* @param {string} endian - ``big`` or ``little
|
|
7713
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7714
7714
|
* @returns number
|
|
7715
7715
|
*/
|
|
7716
7716
|
bit12(value, unsigned, endian) {
|
|
@@ -7746,7 +7746,7 @@ class biwriter {
|
|
|
7746
7746
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7747
7747
|
*
|
|
7748
7748
|
* @param {number} value - value as int
|
|
7749
|
-
* @param {string} endian - ``big`` or ``little
|
|
7749
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7750
7750
|
* @returns number
|
|
7751
7751
|
*/
|
|
7752
7752
|
ubit12(value, endian) {
|
|
@@ -7781,7 +7781,7 @@ class biwriter {
|
|
|
7781
7781
|
*
|
|
7782
7782
|
* @param {number} value - value as int
|
|
7783
7783
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7784
|
-
* @param {string} endian - ``big`` or ``little
|
|
7784
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7785
7785
|
* @returns number
|
|
7786
7786
|
*/
|
|
7787
7787
|
bit13(value, unsigned, endian) {
|
|
@@ -7817,7 +7817,7 @@ class biwriter {
|
|
|
7817
7817
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7818
7818
|
*
|
|
7819
7819
|
* @param {number} value - value as int
|
|
7820
|
-
* @param {string} endian - ``big`` or ``little
|
|
7820
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7821
7821
|
* @returns number
|
|
7822
7822
|
*/
|
|
7823
7823
|
ubit13(value, endian) {
|
|
@@ -7852,7 +7852,7 @@ class biwriter {
|
|
|
7852
7852
|
*
|
|
7853
7853
|
* @param {number} value - value as int
|
|
7854
7854
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7855
|
-
* @param {string} endian - ``big`` or ``little
|
|
7855
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7856
7856
|
* @returns number
|
|
7857
7857
|
*/
|
|
7858
7858
|
bit14(value, unsigned, endian) {
|
|
@@ -7888,7 +7888,7 @@ class biwriter {
|
|
|
7888
7888
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7889
7889
|
*
|
|
7890
7890
|
* @param {number} value - value as int
|
|
7891
|
-
* @param {string} endian - ``big`` or ``little
|
|
7891
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7892
7892
|
* @returns number
|
|
7893
7893
|
*/
|
|
7894
7894
|
ubit14(value, endian) {
|
|
@@ -7923,7 +7923,7 @@ class biwriter {
|
|
|
7923
7923
|
*
|
|
7924
7924
|
* @param {number} value - value as int
|
|
7925
7925
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7926
|
-
* @param {string} endian - ``big`` or ``little
|
|
7926
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7927
7927
|
* @returns number
|
|
7928
7928
|
*/
|
|
7929
7929
|
bit15(value, unsigned, endian) {
|
|
@@ -7959,7 +7959,7 @@ class biwriter {
|
|
|
7959
7959
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
7960
7960
|
*
|
|
7961
7961
|
* @param {number} value - value as int
|
|
7962
|
-
* @param {string} endian - ``big`` or ``little
|
|
7962
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7963
7963
|
* @returns number
|
|
7964
7964
|
*/
|
|
7965
7965
|
ubit15(value, endian) {
|
|
@@ -7994,7 +7994,7 @@ class biwriter {
|
|
|
7994
7994
|
*
|
|
7995
7995
|
* @param {number} value - value as int
|
|
7996
7996
|
* @param {boolean} unsigned - if the value is unsigned
|
|
7997
|
-
* @param {string} endian - ``big`` or ``little
|
|
7997
|
+
* @param {string} endian - ``big`` or ``little``
|
|
7998
7998
|
* @returns number
|
|
7999
7999
|
*/
|
|
8000
8000
|
bit16(value, unsigned, endian) {
|
|
@@ -8030,7 +8030,7 @@ class biwriter {
|
|
|
8030
8030
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8031
8031
|
*
|
|
8032
8032
|
* @param {number} value - value as int
|
|
8033
|
-
* @param {string} endian - ``big`` or ``little
|
|
8033
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8034
8034
|
* @returns number
|
|
8035
8035
|
*/
|
|
8036
8036
|
ubit16(value, endian) {
|
|
@@ -8065,7 +8065,7 @@ class biwriter {
|
|
|
8065
8065
|
*
|
|
8066
8066
|
* @param {number} value - value as int
|
|
8067
8067
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8068
|
-
* @param {string} endian - ``big`` or ``little
|
|
8068
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8069
8069
|
* @returns number
|
|
8070
8070
|
*/
|
|
8071
8071
|
bit17(value, unsigned, endian) {
|
|
@@ -8101,7 +8101,7 @@ class biwriter {
|
|
|
8101
8101
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8102
8102
|
*
|
|
8103
8103
|
* @param {number} value - value as int
|
|
8104
|
-
* @param {string} endian - ``big`` or ``little
|
|
8104
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8105
8105
|
* @returns number
|
|
8106
8106
|
*/
|
|
8107
8107
|
ubit17(value, endian) {
|
|
@@ -8136,7 +8136,7 @@ class biwriter {
|
|
|
8136
8136
|
*
|
|
8137
8137
|
* @param {number} value - value as int
|
|
8138
8138
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8139
|
-
* @param {string} endian - ``big`` or ``little
|
|
8139
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8140
8140
|
* @returns number
|
|
8141
8141
|
*/
|
|
8142
8142
|
bit18(value, unsigned, endian) {
|
|
@@ -8172,7 +8172,7 @@ class biwriter {
|
|
|
8172
8172
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8173
8173
|
*
|
|
8174
8174
|
* @param {number} value - value as int
|
|
8175
|
-
* @param {string} endian - ``big`` or ``little
|
|
8175
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8176
8176
|
* @returns number
|
|
8177
8177
|
*/
|
|
8178
8178
|
ubit18(value, endian) {
|
|
@@ -8207,7 +8207,7 @@ class biwriter {
|
|
|
8207
8207
|
*
|
|
8208
8208
|
* @param {number} value - value as int
|
|
8209
8209
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8210
|
-
* @param {string} endian - ``big`` or ``little
|
|
8210
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8211
8211
|
* @returns number
|
|
8212
8212
|
*/
|
|
8213
8213
|
bit19(value, unsigned, endian) {
|
|
@@ -8243,7 +8243,7 @@ class biwriter {
|
|
|
8243
8243
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8244
8244
|
*
|
|
8245
8245
|
* @param {number} value - value as int
|
|
8246
|
-
* @param {string} endian - ``big`` or ``little
|
|
8246
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8247
8247
|
* @returns number
|
|
8248
8248
|
*/
|
|
8249
8249
|
ubit19(value, endian) {
|
|
@@ -8278,7 +8278,7 @@ class biwriter {
|
|
|
8278
8278
|
*
|
|
8279
8279
|
* @param {number} value - value as int
|
|
8280
8280
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8281
|
-
* @param {string} endian - ``big`` or ``little
|
|
8281
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8282
8282
|
* @returns number
|
|
8283
8283
|
*/
|
|
8284
8284
|
bit20(value, unsigned, endian) {
|
|
@@ -8314,7 +8314,7 @@ class biwriter {
|
|
|
8314
8314
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8315
8315
|
*
|
|
8316
8316
|
* @param {number} value - value as int
|
|
8317
|
-
* @param {string} endian - ``big`` or ``little
|
|
8317
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8318
8318
|
* @returns number
|
|
8319
8319
|
*/
|
|
8320
8320
|
ubit20(value, endian) {
|
|
@@ -8349,7 +8349,7 @@ class biwriter {
|
|
|
8349
8349
|
*
|
|
8350
8350
|
* @param {number} value - value as int
|
|
8351
8351
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8352
|
-
* @param {string} endian - ``big`` or ``little
|
|
8352
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8353
8353
|
* @returns number
|
|
8354
8354
|
*/
|
|
8355
8355
|
bit21(value, unsigned, endian) {
|
|
@@ -8385,7 +8385,7 @@ class biwriter {
|
|
|
8385
8385
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8386
8386
|
*
|
|
8387
8387
|
* @param {number} value - value as int
|
|
8388
|
-
* @param {string} endian - ``big`` or ``little
|
|
8388
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8389
8389
|
* @returns number
|
|
8390
8390
|
*/
|
|
8391
8391
|
ubit21(value, endian) {
|
|
@@ -8420,7 +8420,7 @@ class biwriter {
|
|
|
8420
8420
|
*
|
|
8421
8421
|
* @param {number} value - value as int
|
|
8422
8422
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8423
|
-
* @param {string} endian - ``big`` or ``little
|
|
8423
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8424
8424
|
* @returns number
|
|
8425
8425
|
*/
|
|
8426
8426
|
bit22(value, unsigned, endian) {
|
|
@@ -8456,7 +8456,7 @@ class biwriter {
|
|
|
8456
8456
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8457
8457
|
*
|
|
8458
8458
|
* @param {number} value - value as int
|
|
8459
|
-
* @param {string} endian - ``big`` or ``little
|
|
8459
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8460
8460
|
* @returns number
|
|
8461
8461
|
*/
|
|
8462
8462
|
ubit22(value, endian) {
|
|
@@ -8491,7 +8491,7 @@ class biwriter {
|
|
|
8491
8491
|
*
|
|
8492
8492
|
* @param {number} value - value as int
|
|
8493
8493
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8494
|
-
* @param {string} endian - ``big`` or ``little
|
|
8494
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8495
8495
|
* @returns number
|
|
8496
8496
|
*/
|
|
8497
8497
|
bit23(value, unsigned, endian) {
|
|
@@ -8527,7 +8527,7 @@ class biwriter {
|
|
|
8527
8527
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8528
8528
|
*
|
|
8529
8529
|
* @param {number} value - value as int
|
|
8530
|
-
* @param {string} endian - ``big`` or ``little
|
|
8530
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8531
8531
|
* @returns number
|
|
8532
8532
|
*/
|
|
8533
8533
|
ubit23(value, endian) {
|
|
@@ -8562,7 +8562,7 @@ class biwriter {
|
|
|
8562
8562
|
*
|
|
8563
8563
|
* @param {number} value - value as int
|
|
8564
8564
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8565
|
-
* @param {string} endian - ``big`` or ``little
|
|
8565
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8566
8566
|
* @returns number
|
|
8567
8567
|
*/
|
|
8568
8568
|
bit24(value, unsigned, endian) {
|
|
@@ -8598,7 +8598,7 @@ class biwriter {
|
|
|
8598
8598
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8599
8599
|
*
|
|
8600
8600
|
* @param {number} value - value as int
|
|
8601
|
-
* @param {string} endian - ``big`` or ``little
|
|
8601
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8602
8602
|
* @returns number
|
|
8603
8603
|
*/
|
|
8604
8604
|
ubit24(value, endian) {
|
|
@@ -8633,7 +8633,7 @@ class biwriter {
|
|
|
8633
8633
|
*
|
|
8634
8634
|
* @param {number} value - value as int
|
|
8635
8635
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8636
|
-
* @param {string} endian - ``big`` or ``little
|
|
8636
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8637
8637
|
* @returns number
|
|
8638
8638
|
*/
|
|
8639
8639
|
bit25(value, unsigned, endian) {
|
|
@@ -8669,7 +8669,7 @@ class biwriter {
|
|
|
8669
8669
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8670
8670
|
*
|
|
8671
8671
|
* @param {number} value - value as int
|
|
8672
|
-
* @param {string} endian - ``big`` or ``little
|
|
8672
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8673
8673
|
* @returns number
|
|
8674
8674
|
*/
|
|
8675
8675
|
ubit25(value, endian) {
|
|
@@ -8704,7 +8704,7 @@ class biwriter {
|
|
|
8704
8704
|
*
|
|
8705
8705
|
* @param {number} value - value as int
|
|
8706
8706
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8707
|
-
* @param {string} endian - ``big`` or ``little
|
|
8707
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8708
8708
|
* @returns number
|
|
8709
8709
|
*/
|
|
8710
8710
|
bit26(value, unsigned, endian) {
|
|
@@ -8740,7 +8740,7 @@ class biwriter {
|
|
|
8740
8740
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8741
8741
|
*
|
|
8742
8742
|
* @param {number} value - value as int
|
|
8743
|
-
* @param {string} endian - ``big`` or ``little
|
|
8743
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8744
8744
|
* @returns number
|
|
8745
8745
|
*/
|
|
8746
8746
|
ubit26(value, endian) {
|
|
@@ -8775,7 +8775,7 @@ class biwriter {
|
|
|
8775
8775
|
*
|
|
8776
8776
|
* @param {number} value - value as int
|
|
8777
8777
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8778
|
-
* @param {string} endian - ``big`` or ``little
|
|
8778
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8779
8779
|
* @returns number
|
|
8780
8780
|
*/
|
|
8781
8781
|
bit27(value, unsigned, endian) {
|
|
@@ -8811,7 +8811,7 @@ class biwriter {
|
|
|
8811
8811
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8812
8812
|
*
|
|
8813
8813
|
* @param {number} value - value as int
|
|
8814
|
-
* @param {string} endian - ``big`` or ``little
|
|
8814
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8815
8815
|
* @returns number
|
|
8816
8816
|
*/
|
|
8817
8817
|
ubit27(value, endian) {
|
|
@@ -8846,7 +8846,7 @@ class biwriter {
|
|
|
8846
8846
|
*
|
|
8847
8847
|
* @param {number} value - value as int
|
|
8848
8848
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8849
|
-
* @param {string} endian - ``big`` or ``little
|
|
8849
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8850
8850
|
* @returns number
|
|
8851
8851
|
*/
|
|
8852
8852
|
bit28(value, unsigned, endian) {
|
|
@@ -8882,7 +8882,7 @@ class biwriter {
|
|
|
8882
8882
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8883
8883
|
*
|
|
8884
8884
|
* @param {number} value - value as int
|
|
8885
|
-
* @param {string} endian - ``big`` or ``little
|
|
8885
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8886
8886
|
* @returns number
|
|
8887
8887
|
*/
|
|
8888
8888
|
ubit28(value, endian) {
|
|
@@ -8917,7 +8917,7 @@ class biwriter {
|
|
|
8917
8917
|
*
|
|
8918
8918
|
* @param {number} value - value as int
|
|
8919
8919
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8920
|
-
* @param {string} endian - ``big`` or ``little
|
|
8920
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8921
8921
|
* @returns number
|
|
8922
8922
|
*/
|
|
8923
8923
|
bit29(value, unsigned, endian) {
|
|
@@ -8953,7 +8953,7 @@ class biwriter {
|
|
|
8953
8953
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
8954
8954
|
*
|
|
8955
8955
|
* @param {number} value - value as int
|
|
8956
|
-
* @param {string} endian - ``big`` or ``little
|
|
8956
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8957
8957
|
* @returns number
|
|
8958
8958
|
*/
|
|
8959
8959
|
ubit29(value, endian) {
|
|
@@ -8988,7 +8988,7 @@ class biwriter {
|
|
|
8988
8988
|
*
|
|
8989
8989
|
* @param {number} value - value as int
|
|
8990
8990
|
* @param {boolean} unsigned - if the value is unsigned
|
|
8991
|
-
* @param {string} endian - ``big`` or ``little
|
|
8991
|
+
* @param {string} endian - ``big`` or ``little``
|
|
8992
8992
|
* @returns number
|
|
8993
8993
|
*/
|
|
8994
8994
|
bit30(value, unsigned, endian) {
|
|
@@ -9024,7 +9024,7 @@ class biwriter {
|
|
|
9024
9024
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
9025
9025
|
*
|
|
9026
9026
|
* @param {number} value - value as int
|
|
9027
|
-
* @param {string} endian - ``big`` or ``little
|
|
9027
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9028
9028
|
* @returns number
|
|
9029
9029
|
*/
|
|
9030
9030
|
ubit30(value, endian) {
|
|
@@ -9059,7 +9059,7 @@ class biwriter {
|
|
|
9059
9059
|
*
|
|
9060
9060
|
* @param {number} value - value as int
|
|
9061
9061
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9062
|
-
* @param {string} endian - ``big`` or ``little
|
|
9062
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9063
9063
|
* @returns number
|
|
9064
9064
|
*/
|
|
9065
9065
|
bit31(value, unsigned, endian) {
|
|
@@ -9095,7 +9095,7 @@ class biwriter {
|
|
|
9095
9095
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
9096
9096
|
*
|
|
9097
9097
|
* @param {number} value - value as int
|
|
9098
|
-
* @param {string} endian - ``big`` or ``little
|
|
9098
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9099
9099
|
* @returns number
|
|
9100
9100
|
*/
|
|
9101
9101
|
ubit31(value, endian) {
|
|
@@ -9130,7 +9130,7 @@ class biwriter {
|
|
|
9130
9130
|
*
|
|
9131
9131
|
* @param {number} value - value as int
|
|
9132
9132
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9133
|
-
* @param {string} endian - ``big`` or ``little
|
|
9133
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9134
9134
|
* @returns number
|
|
9135
9135
|
*/
|
|
9136
9136
|
bit32(value, unsigned, endian) {
|
|
@@ -9166,7 +9166,7 @@ class biwriter {
|
|
|
9166
9166
|
* Note: When returning to a byte write, remaining bits are dropped
|
|
9167
9167
|
*
|
|
9168
9168
|
* @param {number} value - value as int
|
|
9169
|
-
* @param {string} endian - ``big`` or ``little
|
|
9169
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9170
9170
|
* @returns number
|
|
9171
9171
|
*/
|
|
9172
9172
|
ubit32(value, endian) {
|
|
@@ -9273,7 +9273,7 @@ class biwriter {
|
|
|
9273
9273
|
*
|
|
9274
9274
|
* @param {number} value - value as int
|
|
9275
9275
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9276
|
-
* @param {string} endian - ``big`` or ``little
|
|
9276
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9277
9277
|
*/
|
|
9278
9278
|
writeInt16(value, unsigned, endian) {
|
|
9279
9279
|
return wint16(this, value, unsigned, endian);
|
|
@@ -9282,7 +9282,7 @@ class biwriter {
|
|
|
9282
9282
|
* Read short
|
|
9283
9283
|
*
|
|
9284
9284
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
9285
|
-
* @param {string} endian -
|
|
9285
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9286
9286
|
* @returns number
|
|
9287
9287
|
*/
|
|
9288
9288
|
readInt16(unsigned, endian) {
|
|
@@ -9293,7 +9293,7 @@ class biwriter {
|
|
|
9293
9293
|
*
|
|
9294
9294
|
* @param {number} value - value as int
|
|
9295
9295
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9296
|
-
* @param {string} endian - ``big`` or ``little
|
|
9296
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9297
9297
|
*/
|
|
9298
9298
|
int16(value, unsigned, endian) {
|
|
9299
9299
|
return this.writeInt16(value, unsigned, endian);
|
|
@@ -9303,7 +9303,7 @@ class biwriter {
|
|
|
9303
9303
|
*
|
|
9304
9304
|
* @param {number} value - value as int
|
|
9305
9305
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9306
|
-
* @param {string} endian - ``big`` or ``little
|
|
9306
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9307
9307
|
*/
|
|
9308
9308
|
short(value, unsigned, endian) {
|
|
9309
9309
|
return this.writeInt16(value, unsigned, endian);
|
|
@@ -9313,7 +9313,7 @@ class biwriter {
|
|
|
9313
9313
|
*
|
|
9314
9314
|
* @param {number} value - value as int
|
|
9315
9315
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9316
|
-
* @param {string} endian - ``big`` or ``little
|
|
9316
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9317
9317
|
*/
|
|
9318
9318
|
word(value, unsigned, endian) {
|
|
9319
9319
|
return this.writeInt16(value, unsigned, endian);
|
|
@@ -9322,7 +9322,7 @@ class biwriter {
|
|
|
9322
9322
|
* Write unsigned int16
|
|
9323
9323
|
*
|
|
9324
9324
|
* @param {number} value - value as int
|
|
9325
|
-
* @param {string} endian - ``big`` or ``little
|
|
9325
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9326
9326
|
*/
|
|
9327
9327
|
writeUInt16(value, endian) {
|
|
9328
9328
|
return this.writeInt16(value, true, endian);
|
|
@@ -9331,7 +9331,7 @@ class biwriter {
|
|
|
9331
9331
|
* Write unsigned int16
|
|
9332
9332
|
*
|
|
9333
9333
|
* @param {number} value - value as int
|
|
9334
|
-
* @param {string} endian - ``big`` or ``little
|
|
9334
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9335
9335
|
*/
|
|
9336
9336
|
uint16(value, endian) {
|
|
9337
9337
|
return this.writeInt16(value, true, endian);
|
|
@@ -9340,7 +9340,7 @@ class biwriter {
|
|
|
9340
9340
|
* Write unsigned int16
|
|
9341
9341
|
*
|
|
9342
9342
|
* @param {number} value - value as int
|
|
9343
|
-
* @param {string} endian - ``big`` or ``little
|
|
9343
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9344
9344
|
*/
|
|
9345
9345
|
ushort(value, endian) {
|
|
9346
9346
|
return this.writeInt16(value, true, endian);
|
|
@@ -9349,7 +9349,7 @@ class biwriter {
|
|
|
9349
9349
|
* Write unsigned int16
|
|
9350
9350
|
*
|
|
9351
9351
|
* @param {number} value - value as int
|
|
9352
|
-
* @param {string} endian - ``big`` or ``little
|
|
9352
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9353
9353
|
*/
|
|
9354
9354
|
uword(value, endian) {
|
|
9355
9355
|
return this.writeInt16(value, true, endian);
|
|
@@ -9489,7 +9489,7 @@ class biwriter {
|
|
|
9489
9489
|
* Writes half float
|
|
9490
9490
|
*
|
|
9491
9491
|
* @param {number} value - value as int
|
|
9492
|
-
* @param {string} endian - ``big`` or ``little
|
|
9492
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9493
9493
|
*/
|
|
9494
9494
|
writeHalfFloat(value, endian) {
|
|
9495
9495
|
return whalffloat(this, value, endian);
|
|
@@ -9497,7 +9497,7 @@ class biwriter {
|
|
|
9497
9497
|
/**
|
|
9498
9498
|
* Read half float
|
|
9499
9499
|
*
|
|
9500
|
-
* @param {string} endian -
|
|
9500
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9501
9501
|
* @returns number
|
|
9502
9502
|
*/
|
|
9503
9503
|
readHalfFloat(endian) {
|
|
@@ -9507,7 +9507,7 @@ class biwriter {
|
|
|
9507
9507
|
* Writes half float
|
|
9508
9508
|
*
|
|
9509
9509
|
* @param {number} value - value as int
|
|
9510
|
-
* @param {string} endian - ``big`` or ``little
|
|
9510
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9511
9511
|
*/
|
|
9512
9512
|
half(value, endian) {
|
|
9513
9513
|
return this.writeHalfFloat(value, endian);
|
|
@@ -9516,7 +9516,7 @@ class biwriter {
|
|
|
9516
9516
|
* Writes half float
|
|
9517
9517
|
*
|
|
9518
9518
|
* @param {number} value - value as int
|
|
9519
|
-
* @param {string} endian - ``big`` or ``little
|
|
9519
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9520
9520
|
*/
|
|
9521
9521
|
halffloat(value, endian) {
|
|
9522
9522
|
return this.writeHalfFloat(value, endian);
|
|
@@ -9577,7 +9577,7 @@ class biwriter {
|
|
|
9577
9577
|
*
|
|
9578
9578
|
* @param {number} value - value as int
|
|
9579
9579
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9580
|
-
* @param {string} endian - ``big`` or ``little
|
|
9580
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9581
9581
|
*/
|
|
9582
9582
|
writeInt32(value, unsigned, endian) {
|
|
9583
9583
|
return wint32(this, value, unsigned, endian);
|
|
@@ -9586,7 +9586,7 @@ class biwriter {
|
|
|
9586
9586
|
* Read 32 bit integer
|
|
9587
9587
|
*
|
|
9588
9588
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
9589
|
-
* @param {string} endian -
|
|
9589
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9590
9590
|
* @returns number
|
|
9591
9591
|
*/
|
|
9592
9592
|
readInt32(unsigned, endian) {
|
|
@@ -9597,7 +9597,7 @@ class biwriter {
|
|
|
9597
9597
|
*
|
|
9598
9598
|
* @param {number} value - value as int
|
|
9599
9599
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9600
|
-
* @param {string} endian - ``big`` or ``little
|
|
9600
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9601
9601
|
*/
|
|
9602
9602
|
int(value, unsigned, endian) {
|
|
9603
9603
|
return this.writeInt32(value, unsigned, endian);
|
|
@@ -9607,7 +9607,7 @@ class biwriter {
|
|
|
9607
9607
|
*
|
|
9608
9608
|
* @param {number} value - value as int
|
|
9609
9609
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9610
|
-
* @param {string} endian - ``big`` or ``little
|
|
9610
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9611
9611
|
*/
|
|
9612
9612
|
int32(value, unsigned, endian) {
|
|
9613
9613
|
return this.writeInt32(value, unsigned, endian);
|
|
@@ -9617,7 +9617,7 @@ class biwriter {
|
|
|
9617
9617
|
*
|
|
9618
9618
|
* @param {number} value - value as int
|
|
9619
9619
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9620
|
-
* @param {string} endian - ``big`` or ``little
|
|
9620
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9621
9621
|
*/
|
|
9622
9622
|
double(value, unsigned, endian) {
|
|
9623
9623
|
return this.writeInt32(value, unsigned, endian);
|
|
@@ -9627,7 +9627,7 @@ class biwriter {
|
|
|
9627
9627
|
*
|
|
9628
9628
|
* @param {number} value - value as int
|
|
9629
9629
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9630
|
-
* @param {string} endian - ``big`` or ``little
|
|
9630
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9631
9631
|
*/
|
|
9632
9632
|
long(value, unsigned, endian) {
|
|
9633
9633
|
return this.writeInt32(value, unsigned, endian);
|
|
@@ -9844,7 +9844,7 @@ class biwriter {
|
|
|
9844
9844
|
* Write float
|
|
9845
9845
|
*
|
|
9846
9846
|
* @param {number} value - value as int
|
|
9847
|
-
* @param {string} endian - ``big`` or ``little
|
|
9847
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9848
9848
|
*/
|
|
9849
9849
|
writeFloat(value, endian) {
|
|
9850
9850
|
return wfloat(this, value, endian);
|
|
@@ -9852,7 +9852,7 @@ class biwriter {
|
|
|
9852
9852
|
/**
|
|
9853
9853
|
* Read float
|
|
9854
9854
|
*
|
|
9855
|
-
* @param {string} endian -
|
|
9855
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9856
9856
|
* @returns number
|
|
9857
9857
|
*/
|
|
9858
9858
|
readFloat(endian) {
|
|
@@ -9862,7 +9862,7 @@ class biwriter {
|
|
|
9862
9862
|
* Write float
|
|
9863
9863
|
*
|
|
9864
9864
|
* @param {number} value - value as int
|
|
9865
|
-
* @param {string} endian - ``big`` or ``little
|
|
9865
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9866
9866
|
*/
|
|
9867
9867
|
float(value, endian) {
|
|
9868
9868
|
return this.writeFloat(value, endian);
|
|
@@ -9907,7 +9907,7 @@ class biwriter {
|
|
|
9907
9907
|
*
|
|
9908
9908
|
* @param {number} value - value as int
|
|
9909
9909
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9910
|
-
* @param {string} endian - ``big`` or ``little
|
|
9910
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9911
9911
|
*/
|
|
9912
9912
|
writeInt64(value, unsigned, endian) {
|
|
9913
9913
|
return wint64(this, value, unsigned, endian);
|
|
@@ -9915,7 +9915,7 @@ class biwriter {
|
|
|
9915
9915
|
/**
|
|
9916
9916
|
* Read signed 64 bit integer
|
|
9917
9917
|
* @param {boolean} unsigned - if value is unsigned or not
|
|
9918
|
-
* @param {string} endian -
|
|
9918
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9919
9919
|
* @returns number
|
|
9920
9920
|
*/
|
|
9921
9921
|
readInt64(unsigned, endian) {
|
|
@@ -9926,7 +9926,7 @@ class biwriter {
|
|
|
9926
9926
|
*
|
|
9927
9927
|
* @param {number} value - value as int
|
|
9928
9928
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9929
|
-
* @param {string} endian - ``big`` or ``little
|
|
9929
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9930
9930
|
*/
|
|
9931
9931
|
int64(value, unsigned, endian) {
|
|
9932
9932
|
return this.writeInt64(value, unsigned, endian);
|
|
@@ -9936,7 +9936,7 @@ class biwriter {
|
|
|
9936
9936
|
*
|
|
9937
9937
|
* @param {number} value - value as int
|
|
9938
9938
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9939
|
-
* @param {string} endian - ``big`` or ``little
|
|
9939
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9940
9940
|
*/
|
|
9941
9941
|
quad(value, unsigned, endian) {
|
|
9942
9942
|
return this.writeInt64(value, unsigned, endian);
|
|
@@ -9946,7 +9946,7 @@ class biwriter {
|
|
|
9946
9946
|
*
|
|
9947
9947
|
* @param {number} value - value as int
|
|
9948
9948
|
* @param {boolean} unsigned - if the value is unsigned
|
|
9949
|
-
* @param {string} endian - ``big`` or ``little
|
|
9949
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9950
9950
|
*/
|
|
9951
9951
|
bigint(value, unsigned, endian) {
|
|
9952
9952
|
return this.writeInt64(value, unsigned, endian);
|
|
@@ -9955,7 +9955,7 @@ class biwriter {
|
|
|
9955
9955
|
* Write unsigned 64 bit integer
|
|
9956
9956
|
*
|
|
9957
9957
|
* @param {number} value - value as int
|
|
9958
|
-
* @param {string} endian - ``big`` or ``little
|
|
9958
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9959
9959
|
*/
|
|
9960
9960
|
writeUInt64(value, endian) {
|
|
9961
9961
|
return this.writeInt64(value, true, endian);
|
|
@@ -9964,7 +9964,7 @@ class biwriter {
|
|
|
9964
9964
|
* Write unsigned 64 bit integer
|
|
9965
9965
|
*
|
|
9966
9966
|
* @param {number} value - value as int
|
|
9967
|
-
* @param {string} endian - ``big`` or ``little
|
|
9967
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9968
9968
|
*/
|
|
9969
9969
|
uint64(value, endian) {
|
|
9970
9970
|
return this.writeInt64(value, true, endian);
|
|
@@ -9973,7 +9973,7 @@ class biwriter {
|
|
|
9973
9973
|
* Write unsigned 64 bit integer
|
|
9974
9974
|
*
|
|
9975
9975
|
* @param {number} value - value as int
|
|
9976
|
-
* @param {string} endian - ``big`` or ``little
|
|
9976
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9977
9977
|
*/
|
|
9978
9978
|
ubigint(value, endian) {
|
|
9979
9979
|
return this.writeInt64(value, true, endian);
|
|
@@ -9982,7 +9982,7 @@ class biwriter {
|
|
|
9982
9982
|
* Write unsigned 64 bit integer
|
|
9983
9983
|
*
|
|
9984
9984
|
* @param {number} value - value as int
|
|
9985
|
-
* @param {string} endian - ``big`` or ``little
|
|
9985
|
+
* @param {string} endian - ``big`` or ``little``
|
|
9986
9986
|
*/
|
|
9987
9987
|
uquad(value, endian) {
|
|
9988
9988
|
return this.writeInt64(value, true, endian);
|
|
@@ -10122,8 +10122,7 @@ class biwriter {
|
|
|
10122
10122
|
* Writes double float
|
|
10123
10123
|
*
|
|
10124
10124
|
* @param {number} value - value as int
|
|
10125
|
-
* @param {
|
|
10126
|
-
* @param {string} endian - ``big`` or ``little`
|
|
10125
|
+
* @param {string} endian - ``big`` or ``little``
|
|
10127
10126
|
*/
|
|
10128
10127
|
writeDoubleFloat(value, endian) {
|
|
10129
10128
|
return wdfloat(this, value, endian);
|
|
@@ -10131,7 +10130,7 @@ class biwriter {
|
|
|
10131
10130
|
/**
|
|
10132
10131
|
* Read double float
|
|
10133
10132
|
*
|
|
10134
|
-
* @param {string} endian -
|
|
10133
|
+
* @param {string} endian - ``big`` or ``little``
|
|
10135
10134
|
* @returns number
|
|
10136
10135
|
*/
|
|
10137
10136
|
readDoubleFloat(endian) {
|
|
@@ -10141,7 +10140,7 @@ class biwriter {
|
|
|
10141
10140
|
* Writes double float
|
|
10142
10141
|
*
|
|
10143
10142
|
* @param {number} value - value as int
|
|
10144
|
-
* @param {string} endian - ``big`` or ``little
|
|
10143
|
+
* @param {string} endian - ``big`` or ``little``
|
|
10145
10144
|
*/
|
|
10146
10145
|
doublefloat(value, endian) {
|
|
10147
10146
|
return this.writeDoubleFloat(value, endian);
|
|
@@ -10150,7 +10149,7 @@ class biwriter {
|
|
|
10150
10149
|
* Writes double float
|
|
10151
10150
|
*
|
|
10152
10151
|
* @param {number} value - value as int
|
|
10153
|
-
* @param {string} endian - ``big`` or ``little
|
|
10152
|
+
* @param {string} endian - ``big`` or ``little``
|
|
10154
10153
|
*/
|
|
10155
10154
|
dfloat(value, endian) {
|
|
10156
10155
|
return this.writeDoubleFloat(value, endian);
|