Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -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