/** * {@inheritdoc} * @see \BitWasp\Buffertools\Types\TypeInterface::read() */ public function read(Parser &$parser) { $math = $this->getMath(); $uint8 = new Uint8($math); $int = $uint8->readBits($parser); if ($math->cmp($int, 0xfd) < 0) { return $int; } else { $uint = $this->solveReadSize($int)[0]; return $uint->read($parser); } }