def decode_tag
      length = 4
      tag = nil
      if (@index + length) <= @string.length
        # There are sufficient bytes remaining to extract a full tag:
        str = @string.slice(@index, length).unpack(@hex)[0].upcase
        if @equal_endian
          tag = "#{str[2..3]}#{str[0..1]},#{str[6..7]}#{str[4..5]}"
        else
          tag = "#{str[0..3]},#{str[4..7]}"
        end
        # Update our position in the string:
        skip(length)
      end
      tag
    end
def decode_tag
      length = 4
      tag = nil
      if (@index + length) <= @string.length
        # There are sufficient bytes remaining to extract a full tag:
        str = @string.slice(@index, length).unpack(@hex)[0].upcase
        if @equal_endian
          tag = "#{str[2..3]}#{str[0..1]},#{str[6..7]}#{str[4..5]}"
        else
          tag = "#{str[0..3]},#{str[4..7]}"
        end
        # Update our position in the string:
        skip(length)
      end
      tag
    end
Decodes 4 bytes of the instance string and formats it as a ruby-dicom tag string.

 @return [String, NilClass] a formatted tag string ('GGGG,EEEE'), or nil (e.g. if at end of string)