Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
[0x200000, 0x1fffff].each do |i|
|
||||
# Encode i => BER
|
||||
ber = [i].pack("w")
|
||||
hex = ber.unpack("C*").collect {|c| "%02x" % c}.join(":")
|
||||
printf "%s => %s\n", i, hex
|
||||
|
||||
# Decode BER => j
|
||||
j = ber.unpack("w").first
|
||||
i == j or fail "BER not preserve integer"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue