Skip to content

Commit 5adb3e9

Browse files
committed
Make BitStream docs a little clearer in README
1 parent 610e6f1 commit 5adb3e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ BitStream, ByteStream.
169169

170170
```javascript
171171
import { BitStream } from './bitjs/io/bitstream.js';
172-
const bstream = new BitStream(someArrayBuffer, true, offset, length);
173-
const crc = bstream.readBits(12); // read in 12 bits as CRC, advancing the pointer
174-
const flagbits = bstream.peekBits(6); // look ahead at next 6 bits, but do not advance the pointer
172+
const bstream = new BitStream(someArrayBuffer, true /** most-significant-bit-to-least */ );
173+
const crc = bstream.readBits(12); // Read in 12 bits as CRC. Advance pointer.
174+
const flagbits = bstream.peekBits(6); // Look ahead at next 6 bits. Do not advance pointer.
175175
```
176176

177177
More details and examples are located on [the API page](./docs/bitjs.io.md).

0 commit comments

Comments
 (0)