From: Francis Cianfrocca Date: 2006-12-08T18:34:22+09:00 Subject: Am I missing something about BER-compressed integer? All: The following: p [9999].pack("w") gives: "\316\017" but I expected to get: "\047\017" Notice the correct bit pattern for the upper octet (100111) appears in the octet generated by Ruby (11001110) but shifted and with an extra bit at the top. Is this a bug in pack("w"), or is my expectation wrong? Thanks, -f