USING: accessors alien.accessors assocs byte-arrays byte-vectors combinators combinators.short-circuit constructors destructors fry io io.binary io.encodings.binary io.streams.byte-array kernel locals macros math math.bitwise math.ranges sequences sequences.private vectors ; IN: bitstreams-bug TUPLE: widthed { bits integer read-only } { #bits integer read-only } ; : ( bits #bits -- widthed ) widthed boa ; inline : zero-widthed ( -- widthed ) 0 0 ; inline : zero-widthed? ( widthed -- ? ) zero-widthed = ; inline : split-widthed ( a b -- c d ) f ; : foo ( widthed -- ) [ 8 split-widthed dup zero-widthed? ] [ bits>> ] B{ } produce-as 3drop ;