Sha256: 1cb7441d6221bf6bd9bdcb537ff28ef37a1692245f4d69de22e02883baed71fe
Contents?: true
Size: 460 Bytes
Versions: 78
Compression:
Stored size: 460 Bytes
Contents
#!/usr/bin/env ruby map = Hash.new { |h, k| h[k] = k }.merge( " " => "Spc", "\x7f" => "DEL" ).merge(%w[ NUL SOH STX ETX EOT ENQ ACK BEL BS TAB LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US ].each_with_index.map { |s, i| [ i.chr, s ] }.to_h) prefixes = 0..0b11 puts ([ '' ] + prefixes.map { |p| '%02b' % p }) * ?\t (1 << 5).times do |x| puts ([ "%05b" % x ] + prefixes.map { |p| map[((p << 5) | x).chr] }) * ?\t end
Version data entries
78 entries across 78 versions & 1 rubygems