You are not logged in.
Pages: 1
How can we compress data transmited between TSQLHttpserver and THttpclient?
Offline
Is there any example using RegisterCompress?
In the server I found this method all right, but in TSQLHttpClient I didn't find it.
Offline
Can someone help me?
Last edited by ManUn (2013-02-14 17:53:28)
Offline
Hi, I'm new in this forum.
How did you solve you problem?
Because I'm having the same problem.
Offline
No...
Offline
Ab, Is the data compress by default?
If I use on the server side:
{$define COMPRESSSYNLZ}
FServer := TSQLHttpServer.Create('8988', DB);
and on the client side:
{$define COMPRESSSYNLZ}
FHttp := TSQLHttpClient.Create(Servidor, '8988', FModel);
Does this code enable the compression?
Offline
Do You mean in the source of the project like this?
{$R *.res}
{$define COMPRESSSYNLZ}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TfrmServer, frmServer);
Application.Run;
end.
Offline
No, in the Project Options dialog.
Go to "Project" Menu, then "Options", then "Conditional Defines" (or something similar).
{$define is LOCAL to the current file scope, unless you define it in the project shared options.
See http://stackoverflow.com/questions/1277 … onditional
Offline
If I don't use any Define, does the framework uses COMPRESSDEFLATE as default?
Offline
"Use the source, Luke!" and RTFM!
Both server side defines COMPRESSSYNLZ and COMPRESSDEFLATE in unit mORMotHttpServer.
There is no such compiler define in mORMotHttpClient - you have to use the Compressions property, setting e.g. Compression := [hcSynLZ, hcDeflate] to allow both SynLZ and deflate compression algorithms.
Just search for "compression" in mORMotHttpClient and I suspect you will find the info.
Offline
Pages: 1