public function writeShortStr($s)
    {
        $this->flushBits();
        if (strlen($s) > 255) {
            throw new \InvalidArgumentException('String too long');
        }

        $this->writeOctet(strlen($s));
        $this->out .= $s;
        return $this;
    }