Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ZOPEN(3)		 BSD Library Functions Manual		      ZOPEN(3)

NAME
     zopen -- open a gzip compressed stream

LIBRARY
     Compression Library (libz,	-lz)

SYNOPSIS
     FILE *
     zopen(const char *path, const char	*mode);

DESCRIPTION
     The zopen() opens a gzip file whose name is the string pointed to by path
     and associates a stream with it.  It is a wrapper around zlib(3) and
     standard stream I/O APIs.

     The argument mode have the	same meaning as	it does	in fopen(3).

     The zopen function	will associate read, write, seek and close functions
     of	zlib(3)	after successfully opened a file with funopen(3) so that they
     will be used to read or write the new stream.

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
     In	addition to the	errors documented for fopen(3),	the zopen function may
     also fail for:

     [ENOMEM]		Insufficient memory is available.

COMPATIBILITY
     This implementation of zopen function first appeared in NetBSD 1.6	and
     FreeBSD 4.5.  The zopen function may not be portable to systems other
     than FreeBSD.

SEE ALSO
     fopen(3), funopen(3), zlib(3)

BSD				 March 5, 2014				   BSD

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | COMPATIBILITY | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=zopen&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help