RTI Connext C API
Version 6.1.1
|
<<extension>> Settings related to compressing user data. More...
Data Fields | |
DDS_CompressionIdMask | compression_ids |
<<extension>> Mask that represents the compression algorithms enabled. More... | |
DDS_UnsignedLong | writer_compression_level |
<<extension>> The level of compression to use when compressing data. More... | |
DDS_Long | writer_compression_threshold |
<<extension>> The threshold, in bytes, above which a serialized sample will be eligible to be compressed. More... | |
<<extension>> Settings related to compressing user data.
DDS_CompressionIdMask DDS_CompressionSettings_t::compression_ids |
<<extension>> Mask that represents the compression algorithms enabled.
A bitmap that represents the compression algorithm IDs (DDS_CompressionIdMask) that are supported by the endpoint. The DDS_DataWriter creation will fail if more than one algorithm is provided.
If a DDS_DataWriter inherits multiple compression IDs from a DDS_Topic, only the least significant bit enabled will be inherited. This forces the following order of preference: DDS_COMPRESSION_ID_ZLIB, DDS_COMPRESSION_ID_BZIP2, DDS_COMPRESSION_ID_LZ4.
Interactions with Security and Batching: Currently, the only algorithm that is supported when compression and batching are enabled on the same DDS_DataWriter is DDS_COMPRESSION_ID_ZLIB.
The combination of compression, batching and data protection is not supported. Please consider using RTPS protection instead of data protection if compression and batching are required. The reason behind this restriction is that when using batching, compression is applied to the entire batch, while data protection is applied to each of the batch samples individually. Compressing already encrypted data results in an expansion of the data instead of a reduction of it because encrypted data does not lend itself to compression. Therefore this combination is not supported and will result in a DataWriter creation error.
Note: When DDS_DataWriterProtocolQosPolicy::serialize_key_with_dispose is enabled and a dispose message is sent, the serialized key is not compressed.
[default] For DDS_Topic, DDS_DataWriter a DDS_CompressionIdMask mask set to DDS_COMPRESSION_ID_MASK_NONE
[default] For DDS_DataReader a DDS_CompressionIdMask mask set to DDS_COMPRESSION_ID_MASK_ALL.
DDS_UnsignedLong DDS_CompressionSettings_t::writer_compression_level |
<<extension>> The level of compression to use when compressing data.
Compression algorithms typically allow you to choose a level with which to compress the data. Each level has trade-offs between the resulting compression ratio and the speed of compression.
[range] [0, 10]
The value 1 represents the fastest compression time and the lowest compression ratio. The value 10 represents the slowest compression time but the highest compression ratio.
A value of 0 disables compression.
[default] DDS_COMPRESSION_LEVEL_BEST_COMPRESSION
DDS_Long DDS_CompressionSettings_t::writer_compression_threshold |
<<extension>> The threshold, in bytes, above which a serialized sample will be eligible to be compressed.
Any sample with a serialized size greater than or equal to the threshold will be eligible to be compressed. All samples with an eligible serialized size will be compressed. Only if the compressed size is smaller than the serialized size will the sample be stored and sent compressed on the wire.
For batching we check the maximum serialized size of the batch, calculated as serialized_sample_max_size * DDS_BatchQosPolicy::max_samples
[range] [0, 2147483647] or DDS_LENGTH_UNLIMITED
Setting the threshold to DDS_LENGTH_UNLIMITED disables the compression.
[default] DDS_COMPRESSION_THRESHOLD_DEFAULT (8192)