4.4BSD/usr/share/man/cat3/zopen.0

Compare this file to the similar file:
Show the results in this format:

ZOPEN(3)                    BSD Programmer's Manual                   ZOPEN(3)

NNAAMMEE
     zzooppeenn - compressed stream open function

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssttddiioo..hh>>

     _F_I_L_E _*
     zzooppeenn(_c_o_n_s_t _c_h_a_r _*_p_a_t_h, _c_o_n_s_t _c_h_a_r _*_m_o_d_e, _i_n_t _b_i_t_s);

DDEESSCCRRIIPPTTIIOONN
     The zzooppeenn() function opens the compressed file whose name is the string
     pointed to by _p_a_t_h and associates a stream with it.

     The argument _m_o_d_e points to one of the following one-character strings:

     ``r''   Open compressed file for reading.  The stream is positioned at
             the beginning of the file.

     ``w''   Truncate file to zero length or create compressed file for writ-
             ing.  The stream is positioned at the beginning of the file.

     Any created files will have mode "S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP |
     S_IROTH | S_IWOTH" (0666), as modified by the process' umask value (see
     umask(2)).

     Files may only be read or written.  Seek operations are not allowed.

     The _b_i_t_s argument, if non-zero, is set to the bits code limit.  If zero,
     the default is 16.  See ccoommpprreessss(_1) for more information.

RREETTUURRNN VVAALLUUEESS
     Upon successful completion zzooppeenn() returns a FILE pointer.  Otherwise,
     NULL is returned and the global variable _e_r_r_n_o is set to indicate the er-
     ror.

EERRRROORRSS
     [EINVAL]  The _m_o_d_e or _b_i_t_s arguments specified to zzooppeenn() were invalid.

     [EFTYPE]  The compressed file starts with an invalid header, or the com-
               pressed file is compressed with more bits than can be handled.

     The zzooppeenn() function may also fail and set _e_r_r_n_o for any of the errors
     specified for the routines fopen(3) or funopen(3).

SSEEEE AALLSSOO
     compress(1),  fopen(3),  funopen(3)

HHIISSTTOORRYY
     The zzooppeenn function first appeared in 4.4BSD.

BBUUGGSS
     The zzooppeenn() function may not be portable to systems other than BSD.

4.4BSD                           June 9, 1993                                1