def consume(size)
      data = @buffer.read(size).to_s

      # If buffered data is not enought, yield fiber until new data will be buffered.
      if data.size < size
        @buffer.reset!

        while data.size != size
          Fiber.yield
          data += @buffer.read(size - data.size)
        end
      end

      data
    end
def consume(size)
      data = @buffer.read(size).to_s

      # If buffered data is not enought, yield fiber until new data will be buffered.
      if data.size < size
        @buffer.reset!

        while data.size != size
          Fiber.yield
          data += @buffer.read(size - data.size)
        end
      end

      data
    end
Consume CBOR data.
 This method will be called only in fiber.

 @param [Integer] size Size to consume
 @return [String]