src/Type/Int8.php
public function read(BinaryReader &$br, $length = null)
    {
        if (!$br->canReadBytes(1)) {
            throw new \OutOfBoundsException('Cannot read 8-bit int, it exceeds the boundary of the file');
        }

        $segment = $br->readFromHandle(1);

        $data = unpack($this->endian, $segment);
        $data = $data[1];

        if ($br->getCurrentBit() != 0) {
            $data = $this->bitReader($br, $data);
        }

        return $data;
    }
public function read(BinaryReader &$br, $length = null)
    {
        if (!$br->canReadBytes(1)) {
            throw new \OutOfBoundsException('Cannot read 8-bit int, it exceeds the boundary of the file');
        }

        $segment = $br->readFromHandle(1);

        $data = unpack($this->endian, $segment);
        $data = $data[1];

        if ($br->getCurrentBit() != 0) {
            $data = $this->bitReader($br, $data);
        }

        return $data;
    }
Returns an Unsigned 8-bit Integer (aka a single byte)

@param  \PhpBinaryReader\BinaryReader $br
@param  null                          $length
@return int
@throws \OutOfBoundsException