Lines Matching defs:length
146 * @param int $length maximum number of bytes to read
150 public function readCurrentEntry($length = PHP_INT_MAX)
152 $length = (int) min($length, $this->contentUntil - $this->position);
153 if ($length === 0) {
156 return $this->readbytes($length);
480 * @param int $length bytes to read
483 protected function readbytes($length)
486 $ret = @gzread($this->fh, $length);
488 $ret = @bzread($this->fh, $length);
490 $ret = @fread($this->fh, $length);
579 // handle filename length restrictions
633 throw new ArchiveCorruptedException('Unexpected length of header');
800 * @param int $length field length
803 static public function numberEncode($value, $length)
807 $maxValue = 1 << (($length - 1) * 3);
811 $encoded = str_repeat(chr(255), max(1, $length - PHP_INT_SIZE));
812 $encoded .= substr($value, max(0, PHP_INT_SIZE - $length + 1));
815 $encoded = chr(128) . str_repeat(chr(0), max(0, $length - PHP_INT_SIZE - 1));
816 $encoded .= substr($value, max(0, PHP_INT_SIZE - $length + 1));
818 $encoded = sprintf("%" . ($length - 1) . "s ", decoct($value));