poke ( value n bitstream -- )


Vocabulary
bitstreams

Inputs
valuean object
nan object
bitstreaman object


Outputs
None

Definition

GENERIC: poke ( value n bitstream -- )


Methods

M:: lsb0-bit-writer poke ( value n bs -- )
value n <widthed>
:> widthed widthed bs widthed>> #bits>> 8 swap -
split-widthed :> ( byte remainder ) byte bs widthed>>
|widthed :> new-byte new-byte #bits>> 8 = [
new-byte bits>> bs bytes>> push
zero-widthed bs widthed<< remainder widthed>bytes
[ bs bytes>> push-all ] [ bs widthed<< ] bi*
] [ byte bs widthed<< ] if ;