diff --git a/src/modules/zlibmod/doc/gz_deflate b/src/modules/zlibmod/doc/gz_deflate new file mode 100644 index 0000000000000000000000000000000000000000..4d5e4d2d118935a77ea0991012ce34e7b764638b --- /dev/null +++ b/src/modules/zlibmod/doc/gz_deflate @@ -0,0 +1,61 @@ +NAME + Gz_deflate - gzip packer + +DESCRIPTION + Gz_inflate is a builtin program written in C. It interfaces the + packing routines in the libz library. + +NOTA BENE + This program is only available if libz was available and found when + Pike was compiled. + +SEE ALSO + gz_inflate + +============================================================================ +NAME + create - initialize gzip packer + +SYNTAX + void create(int X) + or + object(Gz_deflate) Gz_deflate(int X) + +DESCRIPTION + This functionion is called when a new Gz_deflate is created. + If given, X should be a number from 0 to 9 indicating the packing / + cpu ratio. Zero means no packing, 2-3 is considered 'fast', 6 is + default and higher is considered 'slow' but gives better packing. + + This function can also be used to re-initialize a gz_deflate object + so it can be re-used. + +============================================================================ +NAME + deflate - pack data + +SYNAX + string deflate(string data, int flush); + +DESCRIPTION + This function preforms gzip style compression on a string and + returns the packed data. Streaming can be done by calling this + functon several time and concatenating the returned data. + The optional 'flush' argument should be one f the following: + + Gz_deflate->NO_FLUSH Only data that doesn't fit in the + internal buffers is returned. + Gz_deflate->PARTIAL_FLUSH All input is packed and returned. + Gz_deflate->SYNC_FLUSH All input is packed and returned. + Packing is syncronized. + Gz_deflate->FINISH All input is packed and an 'end of + data' marker is appended. + + Using flushing will degrade packing. Normally NO_FLUSH should be + used until the end of the data when FINISH should be used. For + interactive data PARTIAL_FLUSH should be used. + +SEE ALSO + gz_inflate->inflate + +============================================================================ diff --git a/src/modules/zlibmod/doc/gz_inflate b/src/modules/zlibmod/doc/gz_inflate new file mode 100644 index 0000000000000000000000000000000000000000..da64e39af1db5bbf7f695475ba78a4e0a68b9026 --- /dev/null +++ b/src/modules/zlibmod/doc/gz_inflate @@ -0,0 +1,53 @@ +NAME + Gz_inflate - gzip unpacker + +DESCRIPTION + Gz_inflate is a builtin program written in C. It interfaces the + packing routines in the libz library. + +NOTA BENE + This program is only available if libz was available and found when + Pike was compiled. + +SEE ALSO + gz_deflate + +============================================================================ +NAME + create - initialize gzip packer + +SYNTAX + void create() + or + object(Gz_inflate) Gz_inflate() + +DESCRIPTION + This functionion is called when a new Gz_inflate is created. + It can also be called after the object has been used to re-initialize + it. + +============================================================================ +NAME + inflate - unpack data + +SYNAX + string inflate(string data); + +DESCRIPTION + This function preforms gzip style decompression. It can inflate + a whole file at once or in blocks. + +EXAMPLES + #include <stdio.h> + // whole file + write(Gz_inflate()->inflate(stdin->read(0x7fffffff)); + + // streaming (blocks) + function inflate=Gz_inflate()->inflate; + while(string s=stdin->read(8192)) + write(inflate(s)); + +SEE ALSO + gz_deflate->deflate + +============================================================================