This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



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

NAME
     zopen -- compressed stream open function

SYNOPSIS
     #include "zopen.h"

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

DESCRIPTION
     The zopen() function opens the compressed file whose name is the string pointed to by path and asso-ciates associates
     ciates 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 file.

     ``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.

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

ERRORS
     [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 compressed 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).

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

HISTORY
     The zopen function first appeared in 4.4BSD.

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

BSD                                             June 9, 1993                                             BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...