On Wed, Apr 09, 2003 at 05:46:03AM +0900, Philip Mak wrote:
> So if I pack with 'l', it won't work on different architectures. And
> if I pack with 'N', it won't allow negative numbers.

[-1].pack("N")
=> "\377\377\377\377"

Looks OK to me for packing. Unpacking treats this as unsigned though; you
could just test for values >= 2**31 and subtract 2**32