From: "Aaron D. Gifford" Date: 2011-04-07T13:56:43+09:00 Subject: Packing and unpacking unsigned integers of arbitrary size as binary strings I see there's a 'w' option to pack for packing arbitrary sized unsigned integers in BER compressed format. However I need to pack/unpack binary strings as simple binary byte strings. The results of my own needs have been gemmified as the bignumpack gem. See https://github.com/astounding/bignumpack/blob/master/lib/bignumpack.rb Are there alternatives that may be more efficient, or if I've missed something obvious. I resorted to splitting the binary string into 64-bit sized chunks and using the 'Q' packing option (except where I couldn't determine endianness, where I resorted to using the 32-bit network-order 'N' packing option). While I tried to be endian-architecture friendly, I don't have a big-endian box with Ruby on it handy to test and would appreciate it if anyone on a big-endian box would let me know if the tests fail. Aaron out.