IoT Platform supports data compression for messages transmitted between devices and the platform, helping reduce device traffic and accelerate transmission.
Prerequisites
-
Device verification information is obtained. For more information, see Obtain device verification information.
-
Link SDK for C is obtained. For more information, see Obtain Link SDK for C.
When you customize an SDK on the SDK customization page, set the Advanced Capabilities parameter to Data Compression.
-
A development environment is prepared. For more information, see Prepare an environment.
Limits
The data compression feature is available only for Exclusive Enterprise Edition instances and Standard Enterprise Edition instances. For more information, see Purchase an Enterprise instance.
Background information
IoT devices that use cellular networks often incur high traffic costs. Data compression reduces the volume of transmitted data, lowering traffic costs.
How the feature works
A program calls Link SDK for C API operations to submit topic information for compression or decompression to IoT Platform over MQTT. After IoT Platform responds, the system compresses the topic messages before transmission. When you use Link SDK for C to connect a device, the SDK handles compression and decompression transparently — the device-side program sends or receives uncompressed data.
The following figure shows the process. In this example, the ./demos/compress_basic_demo.c program is used.

Examples
-
For usage examples of data compression, see Examples.
-
For error codes related to data compression, see aiot_compress_api.h.