encode-delta ( delta! bias -- seq )


Vocabulary
punycode.private

Inputs
delta!an object
biasan object


Outputs
seqan object


Definition


:: encode-delta ( delta! bias -- seq )
SBUF" " clone :> accum 0 :> j! [
j 1 + j! j bias threshold :> T delta T <
[ f delta ]
[ t delta T - BASE T - /mod T + swap delta! ] if
DIGITS nth accum push
] loop accum ;