Compress Streaming Data Download

Sugar Integrate allows file compression for streamed data to improve data transfer speed and download time. Adapters supporting file download will support the compression feature through which data files downloaded can be compressed into zip or gzip.

How to use this feature

  1. Provide Accept-Encoding in the header while making the API requests. This header is supported for
    • GET/bulk/{id}/{objectName} for all adapters
    • GET/files/{id} for supporting file download
  2. The HTTP response should have the Content-Encoding header indicating the format of the encoded content.

Files compression is only supported in two formats - zip and gzip. On applying the above-mentioned headers, the output file is a compressed file that is downloaded with the .zip or .gz extension depending on the header passed in the request.

Note: If multiple directives are specified in the Accept-Encoding header, Sugar Integrate does not perform the compression and returns the file in its default format.