> nstr = "57";
> ch = nstr[0] - '0';
> number = 10 * ch + nstr[1] - '0';
I think the confusion is he didn't say anything about what "number" is, and
didn't provide a sufficiently large example.
Paul, so decimal 57 gets encoded in 1 byte: 0x39
Would decimal 1234 be encoded in 2 bytes like like 0x0C 0x22 ?
In any case, I have no idea what that would be called. I would imagine it
would be easier (faster) to encode/decode, but it isn't any more efficient
space-wise.
~ Daniel
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:15:48 EDT