read_until (PDF::Reader::Buffer)

    # File lib/pdf/reader/buffer.rb, line 62
        def read_until(bytes)
          out = ""
          size = bytes.size

          if @buffer && !@buffer.empty?
            if @buffer.include?(bytes)
              offset = @buffer.index(bytes) + size
              return head(offset)
            else
              out << head(@buffer.size)
            end
          end

          loop do
            out << @io.read(1)
            if out[-1 * size,size].eql?(bytes)
              out = out[0, out.size - size]
              seek(pos - size)
              break
            end
          end
          out
        end