def encode(value, type)
      value = [value] unless value.is_a?(Array)
      return value.pack(vr_to_str(type))
    end
def encode(value, type)
      value = [value] unless value.is_a?(Array)
      return value.pack(vr_to_str(type))
    end
Encodes a value and returns the resulting binary string.

 === Parameters

 * <tt>value</tt> -- A custom value (String, Fixnum, etc..) or an array of numbers.
 * <tt>type</tt> -- String. The type (vr) of data to encode.