function FieldOptions::setPacked
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.
Generated from protobuf field <code>optional bool packed = 2;</code>
Parameters
bool $var:
Return value
$this
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ FieldOptions.php, line 266
Class
- FieldOptions
- Generated from protobuf message <code>google.protobuf.FieldOptions</code>
Namespace
Google\Protobuf\InternalCode
public function setPacked($var) {
GPBUtil::checkBool($var);
$this->packed = $var;
return $this;
}