binary>ascii ( seq -- seq' )


Vocabulary
uu.private

Inputs
seqan object


Outputs
seq'an object


Definition


:: binary>ascii ( seq -- seq' )
0 :> char! 0 :> bits! seq check-length [
dup length 32 + ,
[ dup empty? bits zero? and ] [
char 8 shift char! bits 8 + bits! dup empty?
[ unclip-slice char bitor char! ] unless
[ bits 6 >= ] [
bits 6 -
[ char swap neg shift 63 bitand 32 + , ]
[ bits! ] bi
] while
] until drop
] "" make ;