public function readBoolean() { $tag = $this->stream->getc(); switch ($tag) { case Tags::TagTrue: return true; case Tags::TagFalse: return false; default: throw $this->unexpectedTag($tag); } }