RTC Forums

Subscription => Support => Topic started by: DPerkins on June 30, 2017, 04:50:20 PM



Title: Sending large compressed files
Post by: DPerkins on June 30, 2017, 04:50:20 PM
I'm using TRtcHttpServer and TRtcServerModule to send the same blocks of data to mutliple clients. Ideally I want to compress the data once and then send to multiple clients when requested.  If I use TRtcServerModule.Compression = clFast for general usage, is there a way to tell it to not attempt to compress my already compressed blobks of data?



Title: Re: Sending large compressed files
Post by: D.Tkalcec (RTC) on June 30, 2017, 05:31:08 PM
Short answer: No, there isn't.

Long answer ...

You can enable automatic compression on TRtcClientModule/TRtcServerModule components if you want the components to compress ALL DATA before sending and decompress after receiving. When automatic compression is enabled, everything will be compressed before sending (again, if it was already compressed). Since RTC compresion is transparent to your own code, enabling or disabling compression doesn't change the way you use the components.

What you can do, ofcourse, is to use one set of TRtcClientModule/TRtcServerModule components with automatic compession enabled and another set of components with compression disabled. You will need to use a different ModuleFileName for each set of components and use the most appropriate TRtcClientModule component on the Client for each job, but the same TRtcFunctionGroup component can be attached to multpile TRtcServerModule components on the Server, so there is no need to explicitly separate your functions on the Server.

Best Regards,
Danijel Tkaclec


Title: Re: Sending large compressed files
Post by: DPerkins on July 04, 2017, 02:39:06 PM
Great, thanks.