|
Enhanced C#
Loyc library documentation
|
Options that control the behavior of SyncProtobuf.Reader and SyncProtobuf.Writer. More...
Options that control the behavior of SyncProtobuf.Reader and SyncProtobuf.Writer.
Reader and Writer do not copy this object, so changing its properties affects any reader/writer that was constructed with it.
Note: reader behaviors that are options in other formats are fixed here by Protobuf semantics: an absent field read as a non-nullable primitive returns the type's default value, integers too large for the requested type are truncated to its low bits (as Protobuf parsers do), and the root message always occupies the entire input.
Nested classes | |
| class | ForWriter |
Properties | |
| int | MaxPayloadSize [get, set] |
| Maximum size, in bytes, of a length-delimited payload (string, byte array, sub-message, list, etc.) that the reader will accept. This guards against corrupt or malicious inputs that claim an enormous length. The default is 64 MB. More... | |
| ObjectMode | RootMode = 64 * 1024 * 1024 [get, set] |
| The ObjectMode used to read/write the root object. This option has no effect if you use NewWriter or NewReader(ReadOnlyMemory{byte}, Options?) directly. More... | |
| ForWriter | Write = ObjectMode.Normal [get, set] |
|
getset |
Maximum size, in bytes, of a length-delimited payload (string, byte array, sub-message, list, etc.) that the reader will accept. This guards against corrupt or malicious inputs that claim an enormous length. The default is 64 MB.
|
getset |
The ObjectMode used to read/write the root object. This option has no effect if you use NewWriter or NewReader(ReadOnlyMemory{byte}, Options?) directly.
The same mode must be used when writing and when reading; in particular, toggling ObjectMode.Deduplicate changes the wire format of the root object (see SyncProtobuf).
1.8.7