diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | inflate.3 | 93 | ||||
-rw-r--r--[l---------] | inflateEnd.3 | 35 | ||||
-rw-r--r--[l---------] | inflateInit.3 | 89 |
4 files changed, 127 insertions, 94 deletions
diff --git a/Makefile b/Makefile index 69a73c8..2f6ad63 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,8 @@ MAN += deflateReset.3 MAN += deflateSetDictionary.3 MAN += deflateTune.3 MAN += inflate.3 +MAN += inflateEnd.3 +MAN += inflateInit.3 MAN += uncompress.3 MAN += zlibCompileFlags.3 MAN += zlibVersion.3 @@ -24,8 +26,6 @@ MAN += zlibVersion.3 MLINKS += adler32.3 adler32_z.3 MLINKS += compress.3 compress2.3 MLINKS += crc32.3 crc32_z.3 -MLINKS += inflate.3 inflateEnd.3 -MLINKS += inflate.3 inflateInit.3 MLINKS += uncompress.3 uncompress2.3 .include <bsd.lib.mk> diff --git a/inflate.3 b/inflate.3 index 1996f14..7157ef1 100644 --- a/inflate.3 +++ b/inflate.3 @@ -4,7 +4,6 @@ . .Sh NAME .Nm inflate , -.Nm inflateInit , .Nm inflateEnd .Nd deflate decompression . @@ -14,66 +13,9 @@ .Sh SYNOPSIS .In zlib.h .Ft int -.Fn inflateInit "z_streamp strm" -.Ft int .Fn inflate "z_streamp strm" "int flush" -.Ft int -.Fn inflateEnd "z_streamp strm" . .Sh DESCRIPTION -See -.Xr deflate 3 -for a description of the -.Vt z_streamp -type. -. -.Pp -.Fn inflateInit -initializes the internal stream state for decompression. -The fields -.Fa next_in , -.Fa avail_in , -.Fa zalloc , -.Fa zfree -and -.Fa opaque -must be initialized before by the caller. -In the current version of -.Fn inflateInit , -the provided input is not read or consumed. -The allocation of a sliding window -will be deferred to the first call of -.Fn inflate -(if the decompression does not complete on the first call). -If -.Fa zalloc -and -.Fa zfree -are set to -.Dv Z_NULL , -.Fn inflateInit -updates them to use default allocation functions. -. -.Pp -.Fn inflateInit -does not perform any decompression. -Actual decompression will be done by -.Fn inflate . -So -.Fa next_in , -.Fa avail_in , -.Fa next_out -and -.Fa avail_out -are unused and unchanged. -The current implementation of -.Fn inflateInit -does not process any header information \(em -that is deferred until -.Fn inflate -is called. -. -.Pp .Fn inflate decompresses as much data as possible, and stops when the input buffer becomes empty @@ -380,31 +322,7 @@ The CRC-32 is checked against the gzip trailer, as is the uncompressed length, modulo 2^32. . -.Pp -.Fn inflateEnd -causes all dynamically allocated data structures -for this stream to be feed. -This function discards any unprocessed input -and does not flush any pending output. -. .Sh RETURN VALUES -.Fn inflateInit -returns -.Dv Z_OK -if success, -.Dv Z_MEM_ERROR -if there was not enough memory, -.Dv Z_VERSION_ERROR -if the zlib library version -is incompatible with the version assumed by the caller, -or -.Dv Z_STREAM_ERROR -if the parameters are invalid, -such as a null pointer to the structure. -.Fa msg -is set to null if there is no error message. -. -.Pp .Fn inflate returns .Dv Z_OK @@ -461,11 +379,6 @@ to look for a good compression block if a partial recovery of the data is to be attempted. . -.Pp -.Fn inflateEnd -returns -.Dv Z_OK -if success, -or -.Dv Z_STREAM_ERROR -if the stream state was inconsistent. +.Sh SEE ALSO +.Xr inflateEnd 3 , +.Xr inflateInit 3 diff --git a/inflateEnd.3 b/inflateEnd.3 index a4ababe..7ac4821 120000..100644 --- a/inflateEnd.3 +++ b/inflateEnd.3 @@ -1 +1,34 @@ -inflate.3 \ No newline at end of file +.Dd November 9, 2018 +.Dt INFLATEEND 3 +.Os +. +.Sh NAME +.Nm inflateEnd +.Nd free inflate stream +. +.Sh LIBRARY +.Lb libz +. +.Sh SYNOPSIS +.In zlib.h +.Ft int +.Fn inflateEnd "z_streamp strm" +. +.Sh DESCRIPTION +All dynamically allocated data structures +for this stream are feed. +This function discards any unprocessed input +and does not flush any pending output. +. +.Sh RETURN VALUES +.Fn inflateEnd +returns +.Dv Z_OK +if success, +or +.Dv Z_STREAM_ERROR +if the stream state was inconsistent. +. +.Sh SEE ALSO +.Xr inflate 3 , +.Xr inflateInit 3 diff --git a/inflateInit.3 b/inflateInit.3 index a4ababe..87c850c 120000..100644 --- a/inflateInit.3 +++ b/inflateInit.3 @@ -1 +1,88 @@ -inflate.3 \ No newline at end of file +.Dd November 9, 2018 +.Dt INFLATEINIT 3 +.Os +. +.Sh NAME +.Nm inflateInit +.Nd initialize inflate stream +. +.Sh LIBRARY +.Lb libz +. +.Sh SYNOPSIS +.In zlib.h +.Ft int +.Fn inflateInit "z_streamp strm" +. +.Sh DESCRIPTION +Initializes the internal stream state for decompression. +The fields +.Fa next_in , +.Fa avail_in , +.Fa zalloc , +.Fa zfree +and +.Fa opaque +must be initialized before by the caller. +In the current version of +.Fn inflateInit , +the provided input is not read or consumed. +The allocation of a sliding window +will be deferred to the first call of +.Xr inflate 3 +(if the decompression does not complete on the first call). +If +.Fa zalloc +and +.Fa zfree +are set to +.Dv Z_NULL , +.Fn inflateInit +updates them to use default allocation functions. +. +.Pp +.Fn inflateInit +does not perform any decompression. +Actual decompression will be done by +.Xr inflate 3 . +So +.Fa next_in , +.Fa avail_in , +.Fa next_out +and +.Fa avail_out +are unused and unchanged. +The current implementation of +.Fn inflateInit +does not process any header information \(em +that is deferred until +.Xr inflate 3 +is called. +. +.Pp +The +.Vt z_streamp +type is documented in +.Xr deflateInit 3 . +. +.Sh RETURN VALUES +.Fn inflateInit +returns +.Dv Z_OK +if success, +.Dv Z_MEM_ERROR +if there was not enough memory, +.Dv Z_VERSION_ERROR +if the zlib library version +is incompatible with the version assumed by the caller, +or +.Dv Z_STREAM_ERROR +if the parameters are invalid, +such as a null pointer to the structure. +.Fa msg +is set to null if there is no error message. +. +.Sh SEE ALSO +.Xr inflate 3 , +.Xr inflateEnd 3 , +.Xr inflateInit2 3 |