../pvss.htm menu.gif basics.gif

gzip()

CtrlZlib is a shared library with functions for data compression. It is based on libz (gzip, gunzip). The function gzip() compresses the content of the parameter source. The result is saved in the parameter target.

caution.gifCAUTION

Under Solaris a zlib  (libz.so) version 1.2.3 is required for the use of the zip functions. Download the zlib version from the internet.

Synopsis

bool gzip(blob | string source, blob &target);

Parameters

Return value

TRUE = Successful

FALSE = Failure

Error

FALSE.

 

Description

The function gzip() compresses the content of the parameter source. The result is saved in the parameter target.

IconExample

    #uses "CtrlZlib"

    main()

    {
      string inh = "Hello this is a test";
      blob tr;
      gzip(inh, tr);
      DebugN("Compressed content", tr);
       
      bool retV;
      string t;
      retV = gunzip(tr, t);
      DebugN("Extracted content", t);
    }

Member of

File function

Availability

 

See also

 

page_top.gif

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved