Skip to content

Commit

Permalink
Make BitStream docs a little clearer in README
Browse files Browse the repository at this point in the history
  • Loading branch information
codedread committed Jun 20, 2024
1 parent 610e6f1 commit 5adb3e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ BitStream, ByteStream.

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

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

0 comments on commit 5adb3e9

Please sign in to comment.