Skip to main content

Class StringStoreBrotliDecoder

Used to receive the next StringStore sent.

Will unregister message handlers after receiving StringStore

Inheritance​
System.Object
Inherited Members​
Show
Syntax​
public class StringStoreBrotliDecoder

Constructors​

StringStoreBrotliDecoder(IMessageReceiver, Int32)​

Declaration​
public StringStoreBrotliDecoder(IMessageReceiver receiver, int maxUncompressedBytes = 67108864)
Parameters​
TypeNameDescription
Mirage.IMessageReceiverreceiver
System.Int32maxUncompressedBytesMax total size of all strings (in UTF-8 bytes) after decompression, see for why the limit exists

Fields​

DefaultMaxUncompressedBytes​

Default max total size of all strings (in UTF-8 bytes) after decompression.

The sizes come from the remote peer, so without a limit a tiny message could make us allocate gigabytes. Peak memory is higher than this limit, because the bytes are also copied into managed UTF-16 strings (up to about 2x more for ASCII).

Declaration​
public const int DefaultMaxUncompressedBytes = 67108864

Properties​

StringStore​

Declaration​
public StringStore StringStore { get; }

Methods​

HandleStringStoreLengthsMessage(StringStoreLengthsMessage)​

Declaration​
public void HandleStringStoreLengthsMessage(StringStoreLengthsMessage message)
Parameters​
TypeNameDescription
Mirage.Serialization.BrotliCompression.StringStoreLengthsMessagemessage

HandleStringStoreStringsMessage(StringStoreStringsMessage)​

Declaration​
public void HandleStringStoreStringsMessage(StringStoreStringsMessage message)
Parameters​
TypeNameDescription
Mirage.Serialization.BrotliCompression.StringStoreStringsMessagemessage