HTTP with "Accept-Encoding:gzip, deflate"?

While kdb+ can act natively as an HTTP/HTTPS client, but it only works with “Accept-Encoding:identity” (the default).

For relatively large data queries via REST, it is often much more efficient to use “Accept-Encoding:gzip, deflate”, allowing compression of the response body. But is kdb+ able to natively decompress the HTTP response body as a gzip/deflate byte stream?

I notice that kdb+'s native compression file format is not exactly the same as a standard gzip byte stream, thus I cannot simply save the HTTP response body as file and read from it. It is possible to write a simple DLL wrapper around zlibwapi.dll, I guess, but I’m just wondering if there is easier way in kdb+ to natively handle gzip byte stream decompression?

Hi, there’s no way to do it natively, however there is an existing library here https://github.com/lmartinking/qgz 
Hope this helps!

Thanks for the pointer! My earlier searches didn’t manage to turn up this project. :^)

I cannot use qgz directly in my environment, but I think the source code is trivial enough that I can easily port it over to my system.

Thanks again!