Treat consecutive packets as if they are a discontinuous buffer.

The default behavior.

@see self::enableContinuousBuffer()
@access public
@internal Could, but not must, extend by the child Crypt_* class
8933
function disableContinuousBuffer()
    {
        if ($this->mode == CRYPT_MODE_ECB) {
            return;
        }
        if (!$this->continuousBuffer) {
            return;
        }

        $this->continuousBuffer = false;
        $this->changed = true;

        $this->_setEngine();
    }
970580
public function enable()
    {
        if ($this->isLoaderRegistered($last)) {
            if ($last) {
                return;
            }

            $this->disable();
        }

        spl_autoload_register($this->aliasLoader);
    }
220579
public void setBuffer (byte[] bytes, int offset, int count) {
		if (bytes == null) throw new IllegalArgumentException("bytes cannot be null.");
		buffer = bytes;
		position = offset;
		limit = offset + count;
		capacity = bytes.length;
		total = 0;
		inputStream = null;
	}
197216
public function consumeSlice($n)
    {
        if ($this->length < $n) {
            throw new BufferUnderflowException();

        } elseif ($this->length === $n) {
            $buffer = $this->buffer;
            $this->buffer = "";
            $this->length = 0;
            return new Buffer($buffer);

        } else {
            $buffer = substr($this->buffer, 0, $n);
            $this->buffer = substr($this->buffer, $n);
            $this->length -= $n;
            return new Buffer($buffer);
        }
    }
532108
function usePersistentConnection()
    {
        if (isset($this->outgoing_headers['Accept-Encoding'])) {
            return FALSE;
        }
        $this->protocol_version     = '1.1';
        $this->persistentConnection = TRUE;
        $this->setHeader('Connection', 'Keep-Alive');

        return TRUE;
    }
227866
private function onWritable()
    {
        $bytesWritten = @\fwrite($this->socket, $this->writeBuffer);

        if ($bytesWritten === false) {
            $this->close();
            return;
        }

        if ($bytesWritten === 0) {
            return;
        }

        $this->timeoutCache->renew($this->id);

        if ($bytesWritten !== \strlen($this->writeBuffer)) {
            $this->writeBuffer = \substr($this->writeBuffer, $bytesWritten);
            return;
        }

        $this->writeBuffer = "";

        Loop::disable($this->writeWatcher);
        $deferred = $this->writeDeferred;
        $this->writeDeferred = null;
        $deferred->resolve();
    }
689494
private ByteBuffer ensureBuffer(int size, ByteBuffer buffer, WritableByteChannel output) throws IOException {
    if(buffer.remaining() >= size) {
      return buffer;
    }
    flushBuffer(buffer, output);
    if(buffer.remaining() >= size) {
      return buffer;
    }
    // Aggressively grow the buffer
    return ByteBuffer.allocateDirect(Math.max(buffer.capacity() << 1, buffer.capacity() + size));
  }
796837
public function stream_flush()
    {
        switch ($this->mode) {
            case 'r+':
            case 'rb+':
            case 'w':
            case 'wb':
            case 'w+':
            case 'wb+':
            case 'a':
            case 'ab':
            case 'a+':
            case 'ab+':
                $origPos = ftell($this->fd);
                fseek($this->fd, 0, SEEK_END);
                $size = ftell($this->fd);
                fseek($this->fd, 0, SEEK_SET);
                $contents = fread($this->fd, $size);
                fseek($this->fd, $origPos, SEEK_SET);
                self::cache()->set($this->path, $contents);
                break;
        }

        return true;
    }
178870
protected function flushWriteBuffer()
    {
        if ($this->flushWriteBufferPromise) {
            return $this->flushWriteBufferPromise;

        } else {
            $deferred = new Promise\Deferred();

            $this->eventLoop->addWriteStream($this->getStream(), function ($stream) use ($deferred) {
                try {
                    $this->write();

                    if ($this->writeBuffer->isEmpty()) {
                        $this->eventLoop->removeWriteStream($stream);
                        $this->flushWriteBufferPromise = null;
                        $deferred->resolve(true);
                    }

                } catch (\Exception $e) {
                    $this->eventLoop->removeWriteStream($stream);
                    $this->flushWriteBufferPromise = null;
                    $deferred->reject($e);
                }
            });

            return $this->flushWriteBufferPromise = $deferred->promise();
        }
    }
444277
@Override
	// @NotThreadSafe
	protected void ensureCapacity(long capacity) throws IOException {
		long curCapacity = pbuffer.capacity();
		if(curCapacity<capacity) expandCapacity(curCapacity, capacity);
	}
708511
function (buffer, start, length) {
  /*jshint bitwise:false*/

  var isNested = buffer instanceof ByteBuffer;

  this.buffer = isNested ? buffer.buffer : buffer;
  this.start = (start || 0) + (isNested ? buffer.start : 0);
  this.length = length || (this.buffer.length - this.start);
  this.offset = 0;

}
227292
protected function loadBuffer()
	{
		$this->remainder = 0;
		
		if($this->ended)
		{
			return;
		}
		
		while(!$this->stream->eof() && strlen($this->buffer) < self::BUFFER_SIZE)
		{
			$this->buffer .= $this->stream->read(self::BUFFER_SIZE);
		}
		
		$m = NULL;
		
		if(preg_match("'^\r?\n?([a-fA-F0-9]+).*\r\n'", $this->buffer, $m))
		{
			$this->remainder = hexdec($m[1]);
			$this->buffer = (string)substr($this->buffer, strlen($m[0]));
			
			if($this->remainder === 0)
			{
				$this->buffer = '';
				$this->ended = true;
			}
			else
			{
				while(!$this->stream->eof() && strlen($this->buffer) < $this->remainder)
				{
					$this->buffer .= $this->stream->read($this->remainder);
				}
				
				if(strlen($this->buffer) < $this->remainder)
				{
					$this->buffer = '';
					$this->ended = true;
				}
			}
		}
		else
		{
			$this->buffer = '';
			$this->ended = true;
		}
	}
214570
public function setContiguous($contiguous = false)
    {
        $this->contiguous = (bool) $contiguous;
        if (!$contiguous) {
            $this->contiguousRow = -1;
        }

        return $this;
    }
152533
public void resetBuffer()
        throws IllegalStateException
    {
        // Shutdown filters without observation
        
        if (_out!=null && _out!=_realOut)
        {
            ArrayList save_observers=_observers;
            _observers=null;
            _nulled=true;
            try
            {
                // discard current buffer and set it to output
                if (_bufferedOut!=null)    
                {
                    _bufferedOut.resetStream();
                    if (_bufferedOut instanceof ChunkingOutputStream)
                        ((ChunkingOutputStream)_bufferedOut).setChunking(false);
                }
            }
            catch(Exception e)
            {
                LogSupport.ignore(log,e);
            }
            finally
            {
                _observers=save_observers;
            }
        }
        _contentLength=-1;
        _nulled=false;
	    _bytes=0;
        _written=false;
        _out=_realOut;
        try
        {
            notify(OutputObserver.__RESET_BUFFER);
        }
        catch(IOException e)
        {
            LogSupport.ignore(log,e);
        }
    }
792192
public function setDistinct()
    {
        $this->removeSelectModifier(self::ALL);
        $this->addSelectModifier(self::DISTINCT);

        return $this;
    }
927572
function pause() {
        $this->paused = true;
        
        if($this->started && !$this->closed) {
            $this->driver->pauseStreamConsumption();
        }
    }
127148
public function nextPortion(): Limiter
    {
        \assert('$this->limit > 0');
        if ($this->limit) {
            $this->offset = min($this->offset + $this->limit, $this->total);
            $this->limit = min($this->limit, $this->total - $this->offset);
        }
        return $this;
    }