[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [idn] ACE37



Edmon <edmon@neteka.com> wrote:

> I think the point I am trying to make is that ACE37 greatly increases
> the capacity for CJK ideographs

Yes, it certainly does (and also reduces the capacity for non-CJK
characters).

> without requiring a complex algorithm

I agree that the amount of complexity it adds to DUDE is not great, but
I think it's comparable to the amount of complexity that AMC-ACE-W adds
to DUDE.  DUDE does not have six different patterns, it has only one
pattern, because they're all handled by the same logic:

  To encode diff:

    for (tmp = diff >> 4, k = 1;  tmp != 0;  ++k, tmp >>= 4);
    out += k;
    output[out - 1] = base32[diff & 0xF];

    for (j = 2;  j <= k;  ++j) {
      diff >>= 4;
      output[out - j] = base32[0x10 | (diff & 0xF)];
    }

  To decode diff:

    /* invariant: c == input[in] */

    for (diff = 0;  ;  c = input[++in]) {
      q = base32_decode(c);
      if (q == base32_invalid) return dude_bad_input;
      diff = (diff << 4) | (q & 0xF);
      if (q >> 4 == 0) break;
    }

ACE37, on the other hand, must have separate logic for each pattern,
right?

By the way, I don't advocate AMC-ACE-W, because it's inferior to
AMC-ACE-Z, for which there will be a draft soon.

AMC