When a client requests data from a service, the service may return data of a considerable size, which slows down data transfer. To speed up that data transfer, you can make use of data compression. Compression reduces the size of the exchanged data, which is useful for larger data sets, or in low-bandwidth environments.

Compression comes in particularly handy for WFS services, which may return large amounts of vector data in uncompressed formats like GeoJSON or GML.

To enable compression:

  1. Open the config/fusion.common.yml file.

  2. Locate the server section.

  3. Uncomment the compression and enabled properties.

  4. Optionally, uncomment and configure the following properties:

    • mime-type: specifies which response types to compress.

    • min-response-size: defines the minimum response size (in bytes) that triggers data compression.

To benefit from compression at the client side, make sure to include the Accept-Encoding: gzip header in the request.