require 'ostruct' module AsciiPack TypeMap = OpenStruct.new({ :int4 => 'a', :int8 => 'b', :int16 => 'c', :int32 => 'd', :int64 => 'e', # (blank) => 'f', :uint8 => 'g', :uint16 => 'h', :uint32 => 'i', :uint64 => 'j', :float32 => 'k', :float64 => 'l', # (blank) => 'm', :bin8 => 'n', :bin16 => 'o', :bin32 => 'p', # (blank) => 'q', :map4 => 'r', :map8 => 's', :map16 => 't', :map32 => 'u', :array4 => 'v', :array8 => 'w', :array16 => 'x', :array32 => 'y', # (blank) => 'z', :positive_fixint_0 => '0', :positive_fixint_1 => '1', :positive_fixint_2 => '2', :positive_fixint_3 => '3', :positive_fixint_4 => '4', :positive_fixint_5 => '5', :positive_fixint_6 => '6', :positive_fixint_7 => '7', :positive_fixint_8 => '8', :positive_fixint_9 => '9', :positive_fixint_A => 'A', :positive_fixint_B => 'B', :positive_fixint_C => 'C', :positive_fixint_D => 'D', :positive_fixint_E => 'E', :positive_fixint_F => 'F', :fixbin_0 => 'G', :fixbin_1 => 'H', :fixbin_2 => 'I', :fixbin_3 => 'J', :fixbin_4 => 'K', :fixbin_5 => 'L', :fixbin_6 => 'M', :fixbin_7 => 'N', :fixbin_8 => 'O', :fixbin_9 => 'P', :fixbin_A => 'Q', :fixbin_B => 'R', :fixbin_C => 'S', :fixbin_D => 'T', :fixbin_E => 'U', :fixbin_F => 'V', :nil => 'W', :false => 'X', :true => 'Y', # (blank) => 'Z', }) end