in reply to encoding BigInts: TIMTOWTDI but any good way?
Sine there is no machine native representation of a bigint that has an analog of a portable network order, why not use good old ascii? To make it more efficient, use a decimal or hexadecimal base (from the manpage):
One could get double density with packed hexadecimals, but it would not be as human readable.# conversion to string (do not modify their argument) $x->bstr(); # normalized string $x->as_hex(); # as signed hexadecimal string with prefixed 0 +x # Number creation $x = Math::BigInt->new($str); # defaults to 0
-Mark
|
|---|