INTEGRAL DSL Reference Guide
Jump directly to:
::my.app.SetCompression(compression)
The SetCompression function sets the compression method that INTEGRAL Web Server utilizes to serve the output buffer to the web client.
Parameters
compression
An integer that stipulates the compression method.
- const DV_COMPRESS_CONFIG = -2 — do not change the compression method, i.e. respect the web site's configuration
- const DV_COMPRESS_AUTO = -1 — automatically choose the best compression method based on the served content
- const DV_COMPRESS_NONE = 0 — no compression
- const DV_COMPRESS_GZIP = 1 — gzip compression
Return Value
The function returns DV_RET_OK on success and DV_RET_ERR on failure.
- const DV_RET_ERR = 0 — failure
- const DV_RET_OK = 1 — success
Notes
This function can be called multiple times during a web session. However, it makes sense to call SetCompression only once. This is because each call to SetCompression discards any previous state set by the same function.
Example 1
::my.app.SetCompression(DV_COMPRESS_GZIP);