bitstreams vocabulary
Factor handbook ยป Vocabulary index


Summary
Reading sequences of bits from a byte stream

Metadata
Authors:Doug Coleman


Words

Tuple classes
ClassSuperclassSlots
bit-reader tuplebytes byte-pos bit-pos
bit-writer tuplebytes widthed
invalid-widthed tuplebits #bits
lsb0-bit-reader bit-reader
lsb0-bit-writer bit-writer
msb0-bit-reader bit-reader
msb0-bit-writer bit-writer
not-enough-bits tuplen bit-reader
widthed tuplebits #bits


Generic words
WordStack effect
peek( n bitstream -- value )
poke( value n bitstream -- )


Ordinary words
WordStack effect
#bits>#bytes( #bits -- #bytes )
(align)( n m -- n' )
(peek)( n bs endian> subseq-endian -- bits )
<lsb0-bit-reader>( bytes -- bs )
<lsb0-bit-writer>( -- bs )
<msb0-bit-reader>( bytes -- bs )
<msb0-bit-writer>( -- bs )
<widthed>( bits #bits -- widthed )
adjust-bits( n bs -- )
align( n bitstream -- )
bit-writer-bytes( writer -- bytes )
byte-array-n>sequence( byte-array n -- seq )
check-widthed( bits #bits -- bits #bits )
enough-bits?( n bs -- ? )
get-abp( bitstream -- abp )
invalid-widthed( bits #bits -- * )
new-bit-writer( class -- bs )
not-enough-bits( n bit-reader -- * )
read( n bitstream -- value )
seek( n bitstream -- )
set-abp( abp bitstream -- )
subseq>bits-be( bignum n bs -- bits )
subseq>bits-le( bignum n bs -- bits )
zero-widthed( -- widthed )
zero-widthed?( widthed -- ? )


Class predicate words
WordStack effect
bit-reader?( object -- ? )
bit-writer?( object -- ? )
invalid-widthed?( object -- ? )
lsb0-bit-reader?( object -- ? )
lsb0-bit-writer?( object -- ? )
msb0-bit-reader?( object -- ? )
msb0-bit-writer?( object -- ? )
not-enough-bits?( object -- ? )
widthed?( object -- ? )


Files


Metadata files