bireader 1.0.33 → 1.0.34
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 +21 -0
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +25 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.d.ts +21 -0
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +25 -0
- package/package.json +1 -1
package/lib/esm/index.mjs
CHANGED
|
@@ -2304,6 +2304,18 @@ export class bireader {
|
|
|
2304
2304
|
*
|
|
2305
2305
|
* Note: When returning to a byte read, remaining bits are dropped
|
|
2306
2306
|
*
|
|
2307
|
+
* @param {number} bits - bits to read
|
|
2308
|
+
* @param {string} endian - ``big`` or ``little`
|
|
2309
|
+
* @returns number
|
|
2310
|
+
*/
|
|
2311
|
+
ubit(bits, endian) {
|
|
2312
|
+
return this.readBit(bits, true, endian);
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* Bit field reader
|
|
2316
|
+
*
|
|
2317
|
+
* Note: When returning to a byte read, remaining bits are dropped
|
|
2318
|
+
*
|
|
2307
2319
|
* @param {boolean} unsigned - if the value is unsigned
|
|
2308
2320
|
* @param {string} endian - ``big`` or ``little`
|
|
2309
2321
|
* @returns number
|
|
@@ -6711,6 +6723,19 @@ export class biwriter {
|
|
|
6711
6723
|
*
|
|
6712
6724
|
* @param {number} value - value as int
|
|
6713
6725
|
* @param {number} bits - bits to write
|
|
6726
|
+
* @param {string} endian - ``big`` or ``little`
|
|
6727
|
+
* @returns number
|
|
6728
|
+
*/
|
|
6729
|
+
ubit(value, bits, endian) {
|
|
6730
|
+
return this.writeBit(value, bits, true, endian);
|
|
6731
|
+
}
|
|
6732
|
+
/**
|
|
6733
|
+
* Bit field writer
|
|
6734
|
+
*
|
|
6735
|
+
* Note: When returning to a byte write, remaining bits are dropped
|
|
6736
|
+
*
|
|
6737
|
+
* @param {number} value - value as int
|
|
6738
|
+
* @param {number} bits - bits to write
|
|
6714
6739
|
* @returns number
|
|
6715
6740
|
*/
|
|
6716
6741
|
writeUBitBE(value, bits) {
|