Vocabulary
bitstreams

Inputs
nan integer
bitstreama bit-reader


Outputs
valuean integer


Word description
Reads the next n bits ahead of the cursor, and then moves the cursor on by n bits. To read bits without moving the cursor, use peek. This word shadows the read word in the io vocabulary, so you may need to alias it if you are using file IO as well as bitstreams.

Definition


: read ( n bitstream -- value ) [ peek ] [ seek ] 2bi ; inline