Handbook
Glossary
adjust-bits ( n bs -- )
Vocabulary
bitstreams
Inputs
n
an
object
bs
an
object
Outputs
None
Definition
USING:
accessors
kernel
math
;
IN:
bitstreams
::
adjust-bits
( n bs -- )
n 8
/mod
:>
( #bytes #bits ) bs
[
#bytes
+
]
change-byte-pos
bit-pos>>
#bits
+
dup
8
>=
[
8
-
bs
bit-pos<<
bs
[
1
+
]
change-byte-pos
drop
]
[
bs
bit-pos<<
]
if
;