Compression Configuration
The PowerTSM HTTP API supports standard HTTP content compression: clients can send compressed request bodies and request compressed responses, reducing the amount of data transferred over the network. This is especially useful for large payloads such as time series data.
Configuration Path
Section titled “Configuration Path”HAKOM:TSM:Http:Hosting:CompressionConfiguration Structure
Section titled “Configuration Structure”Compression├─ EnableRequestDecompression└─ EnableResponseCompressionQuick Start
Section titled “Quick Start”<HAKOM> <TSM> <Http> <Hosting> <Compression> <EnableRequestDecompression>true</EnableRequestDecompression> <!-- Default: false --> <EnableResponseCompression>true</EnableResponseCompression> <!-- Default: false --> </Compression> </Hosting> </Http> </TSM></HAKOM>Configuration Elements
Section titled “Configuration Elements”| Element | Type | Default | Required | Description |
|---|---|---|---|---|
EnableRequestDecompression |
bool |
false |
Enables decompression of compressed request bodies. Clients can send compressed payloads by setting the Content-Encoding header, and the service decompresses them automatically. |
|
EnableResponseCompression |
bool |
false |
Enables compression of response bodies. Responses are compressed when the client signals support via the Accept-Encoding header. |
Request decompression is bounded by the configured request body limit: the bytes read from the decompressed stream are checked against MaxRequestBodySize, which protects against decompression bombs. A small compressed payload that expands beyond the limit fails instead of being processed.
Supported Encodings
Section titled “Supported Encodings”The supported encodings differ between request decompression and response compression:
| Direction | Header | Supported Encodings |
|---|---|---|
| Response | Accept-Encoding |
br, gzip |
| Request | Content-Encoding |
br, gzip, deflate |
Brotli is preferred when the client accepts both br and gzip. Both response providers run at the Fastest compression level.