I've just ran a short test using the RTC SDK v6.0 RC2 and this seems to be working for sending out "deflate" compressed files:
uses rtcInfo, rtcZLib;
function SendDeflateCompressed(Srv:TRtcDataServer; const filename:String);
begin
Srv.Response['Content-Encoding']:='deflate';
Srv.WriteEx(ZCompress_Ex(Read_FileEx(filename),zcDefault));
end;
Here is the same for RTC SDK v5.x and older:
uses rtcInfo, rtcZLib;
function SendDeflateCompressed(Srv:TRtcDataServer; const filename:String);
begin
Srv.Response['Content-Encoding']:='deflate';
Srv.Write(ZCompress_Str(Read_File(filename),zcDefault));
end;
Best Regards,
Danijel Tkalcec