RTI Connext Traditional C++ API  Version 6.1.2

<<extension>> Settings related to compressing user data. More...

Public Attributes

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...
 

Detailed Description

<<extension>> Settings related to compressing user data.

QoS:
DDS_DataRepresentationQosPolicy

Member Data Documentation

◆ compression_ids

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 DDSDataWriter creation will fail if more than one algorithm is provided.

If a DDSDataWriter inherits multiple compression IDs from a DDSTopic, 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 DDSDataWriter 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 DDSTopic, DDSDataWriter a DDS_CompressionIdMask mask set to DDS_COMPRESSION_ID_MASK_NONE

[default] For DDSDataReader a DDS_CompressionIdMask mask set to DDS_COMPRESSION_ID_MASK_ALL.

◆ writer_compression_level

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

Note
Only available for a DDSDataWriter and DDSTopic.

◆ writer_compression_threshold

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)

Note
Only available for a DDSDataWriter and DDSTopic.