method
get_unpack
get_unpack(template)
public
Hide source
# File lib/resolv.rb, line 1465 def get_unpack(template) len = 0 template.each_byte {|byte| byte = "%c" % byte case byte when cc, CC len += 1 when nn len += 2 when NN len += 4 else raise StandardError.new("unsupported template: '#{byte.chr}' in '#{template}'") end } raise DecodeError.new("limit exceeded") if @limit < @index + len arr = @data.unpack("@#{@index}#{template}") @index += len return arr end