deflateBound — Estimates the size of buffer required to compress sourceLen bytes of data.
The deflateBound()
shall return a value
representing the upper bound of an array to allocate to hold
the compressed data in a single call to deflate().
If the stream is not correctly
initialized,
or is NULL
,
then deflateBound()
may return a conservative value that may be larger than sourceLen.
The deflateBound()
function estimates the size
of buffer required to compress sourceLen
bytes of data. If successful, the value returned shall be an upper
bound for the size of buffer required to compress sourceLen
bytes of data, using the
parameters stored in stream, in a
single
call to deflate() with
flush set to
Z_FINISH
.
On entry, stream should have been initialized via a call to deflateInit_() or deflateInit2_().
Size of buffer required to compress sourceLength bytes of data:
#include <stdio.h> |
Output
Size of buffer required is 28. |
None defined.
For additional information or queries on this page send feedback
© 2005-2007 Nokia |