decode-delta ( extended extpos! bias -- extpos' delta )


Vocabulary
punycode.private

Inputs
extendedan object
extpos!an object
biasan object


Outputs
extpos'an object
deltaan object


Definition


:: decode-delta ( extended extpos! bias -- extpos' delta )
0 :> delta! 1 :> w! 0 :> j! [
j 1 + j! j bias threshold :> T extpos extended nth
decode-digit :> digit extpos 1 + extpos! digit w *
delta + delta! BASE T - w * w! digit T >=
] loop extpos delta ;