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/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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bireader",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "Read and write data in binary",
5
5
  "module": "lib/esm/index.mjs",
6
6
  "main": "lib/cjs/index.js",