@thi.ng/bitstream 2.2.49 → 2.2.50

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-01T15:22:50Z
3
+ - **Last updated**: 2024-03-02T14:05:53Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -90,6 +90,8 @@ but JS can only represent integers (w/o loss of precision) up to
90
90
  technically the max. supported word width is 64 bits.
91
91
 
92
92
  ```ts
93
+ import { BitOutputStream } from "@thi.ng/bitstream";
94
+
93
95
  out = new BitOutputStream();
94
96
  // write 3-bit number (only the lowest 3 bits are used, here 0x05)
95
97
  out.write(0xf5, 3);
@@ -129,7 +131,7 @@ Using `input.seek(pos)`, the read position can be repositioned within
129
131
  stream limits.
130
132
 
131
133
  ```ts
132
- // get input from output stream...
134
+ // get input from output stream (see above)...
133
135
  // (for reference, the ^ indicate the start of each bit field)
134
136
  [...out.reader()].join("")
135
137
  // "10111001101101111011001010111110111010110110101010101010100101010101010101"
@@ -149,6 +151,8 @@ out.reader().readStruct([["a", 3], ["b", 7], ["c", 32], ["d", 16], ["e", 16]]);
149
151
  out.reader().seek(10).readWords(4, 16).map(x=>x.toString(16));
150
152
  // [ 'deca', 'fbad', 'aaaa', '5555' ]
151
153
 
154
+ import { BitInputStream } from "@thi.ng/bitstream";
155
+
152
156
  src = new Uint8Array([0xf1,0xe2,0xd3,0xc4,0xb5,0xa6,0x97,0x88]);
153
157
  // create stream from bit 36
154
158
  input = new BitInputStream(src, 36);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/bitstream",
3
- "version": "2.2.49",
3
+ "version": "2.2.50",
4
4
  "description": "ES6 iterator based read/write bit streams with support for variable word widths",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -81,5 +81,5 @@
81
81
  "rle-pack"
82
82
  ]
83
83
  },
84
- "gitHead": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
84
+ "gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
85
85
  }