lib/pdf/reader/buffer.rb
# if we're currently inside a hex string, read hex nibbles until
# we find a closing >
#
if we're currently inside a hex string, read hex nibbles until
we find a closing >
if we ' re currently inside a hex string read hex nibbles until we find a closing >
def prepare_hex_token
      str = "".dup
      finished = false
      while !finished
        byte = @io.getbyte
        if byte.nil?
          finished = true 
        elsif (48..57).include?(byte) || (65..90).include?(byte) || (97..122).include?(byte)
          str << byte
        elsif byte <= 32
        else
          @tokens << str if str.size > 0
          @tokens << ">" if byte != 0x3E 
          @tokens << byte.chr
          finished = true
        end
      end
    end
def prepare_hex_token str = "" . dup finished = false while ! finished byte = @io . getbyte if byte . nil? finished = true elsif ( 48 .. 57 ) . include? ( byte ) || ( 65 .. 90 ) . include? ( byte ) || ( 97 .. 122 ) . include? ( byte ) str << byte elsif byte <= 32 else @tokens << str if str . size > 0 @tokens << ">" if byte != 0x3E @tokens << byte . chr finished = true end end end
if we're currently inside a hex string, read hex nibbles until
we find a closing >
if we ' re currently inside a hex string read hex nibbles until we find a closing >
# unbalanced params # ignore it # '>'