inflateinit man page on Plan9

Man page or keyword search:  
man Server   549 pages
apropos Keyword Search (all sections)
Output format
Plan9 logo
[printable version]

FLATE(2)							      FLATE(2)

       deflateinit,   deflate,	deflatezlib,  deflateblock,  deflatezlibblock,
       inflateinit, inflate, inflatezlib, inflateblock, inflatezlibblock, fla‐
       teerr, mkcrctab, blockcrc, adler32 - deflate compression

       #include <u.h>
       #include <libc.h>
       #include <flate.h>

       int    deflateinit(void)

       int    deflate(void *wr, int (*w)(void*,void*,int),
	      void *rr, int (*r)(void*,void*,int),
	      int level, int debug)

       int    deflatezlib(void *wr, int (*w)(void*,void*,int),
	      void *rr, int (*r)(void*,void*,int),
	      int level, int debug)

       int    deflateblock(uchar *dst, int dsize,
	      uchar *src, int ssize,
	      int level, int debug)

       int    deflatezlibblock(uchar *dst, int dsize,
	      uchar *src, int ssize,
	      int level, int debug)

       int    inflateinit(void)

       int    inflate(void *wr, int (*w)(void*, void*, int),
	      void *getr, int (*get)(void*))

       int    inflatezlib(void *wr, int (*w)(void*, void*, int),
	      void *getr, int (*get)(void*))

       int    inflateblock(uchar *dst, int dsize,
	      uchar *src, int ssize)

       int    inflatezlibblock(uchar *dst, int dsize,
	      uchar *src, int ssize)

       char   *flateerr(int error)

       ulong  *mkcrctab(ulong poly)

       ulong  blockcrc(ulong *tab, ulong crc, void *buf, int n)

       ulong  adler32(ulong adler, void *buf, int n)

       These  routines compress and decompress data using the deflate compres‐
       sion algorithm, which is used for most gzip, zip, and zlib files.

       Deflate compresses input data retrieved by calls to  r  with  arguments
       rr, an input buffer, and a count of bytes to read.  R should return the
       number of bytes read; end of input is signaled by  returning  zero,  an
       input  error  by returning a negative number.  The compressed output is
       written to w with arguments wr, the output  data,  and  the  number  of
       bytes  to  write.  W should return the number of bytes written; writing
       fewer than the requested number of bytes is an error.  Level  indicates
       the amount of computation deflate should do while compressing the data.
       Higher levels usually take  more	 time  and  produce  smaller  outputs.
       Valid  values  are 1 to 9, inclusive; 6 is a good compromise.  If debug
       is non-zero, cryptic debugging  information  is	produced  on  standard

       Inflate	reverses  the  process, converting compressed data into uncom‐
       pressed output.	Input is retrieved one byte at a time by  calling  get
       with  the argument getr.	 End of input of signaled by returning a nega‐
       tive value.  The uncompressed output is written to  w,  which  has  the
       same interface as for deflate.

       Deflateblock  and inflateblock operate on blocks of memory but are oth‐
       erwise similar to deflate and inflate.

       The zlib functions are similar, but operate on files with a zlib header
       and trailer.

       Deflateinit  or	inflateinit must be called once before any call to the
       corresponding routines.

       If the above routines fail, they return a  negative  number  indicating
       the  problem.  The possible values are FlateNoMem, FlateInputFail, Fla‐
       teOutputFail, FlateCorrupted, and FlateInternal.	 Flateerr converts the
       number  into  a	printable message.  FlateOk is defined to be zero, the
       successful  return  value  for	deflateinit,   deflate,	  deflatezlib,
       inflateinit,  inflate, and inflatezlib.	The block functions return the
       number of bytes produced when they succeed.

       Mkcrctab allocates (using malloc(2)), initializes, and returns a	 table
       for  rapid  computation of 32 bit CRC values using the polynomial poly.
       Blockcrc uses tab, a table returned by mkcrctab, to update crc for  the
       n  bytes	 of  data  in buf, and returns the new value.  Crc should ini‐
       tially be zero.	Blockcrc pre-conditions	 and  post-conditions  crc  by
       ones complementation.

       Adler32	updates	 the  Adler  32-bit checksum of the n butes of data in
       buf.  The initial value of adler (that is, its value after seeing  zero
       bytes) should be 1.


                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net