Unix/Linux Go Back    

OpenDarwin 7.2.1 - man page for zopen (opendarwin section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

ZOPEN(3)			   BSD Library Functions Manual 			 ZOPEN(3)

     zopen -- compressed stream open function

     #include <stdio.h>

     FILE *
     zopen(const char *path, const char *mode, int bits);

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

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

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

     ``w''   Truncate file to zero length or create compressed file for writing.  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 bits argument, if non-zero, is set to the bits code limit.  If zero, the default is 16.
     See compress(1) for more information.

     Upon successful completion zopen() returns a FILE pointer.  Otherwise, NULL is returned and
     the global variable errno is set to indicate the error.

     [EINVAL]  The mode or bits arguments specified to zopen() were invalid.

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

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

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

     The zopen function first appeared in 4.4BSD.

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

BSD					   June 9, 1993 				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 07:48 PM.