Lines Matching refs:file
73 file compression on file systems, has a larger header than zlib to maintain
117 int xflags; /* extra flags (not used when writing a gzip file) */
122 Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
128 when writing a gzip file) */
223 compatible with the zlib.h header file used by the application. This check
572 file name, no extra data, no comment, no modification time (set to zero), no
821 gzip file" and give up.
1093 the version of the header file.
1106 inflate() for file i/o applications, in that it avoids copying between the
1295 /* gzip file access functions */
1304 typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
1309 Open the gzip (.gz) file at path for reading and decompressing, or
1319 be written be appended to the file. "+" will result in an error, since
1320 reading and writing to the same gzip file is not supported. The addition of
1321 "x" when writing will create the file exclusively, which fails if the file
1323 reading or writing will set the flag to close the file on an execve() call.
1326 streams in a file. The append function of gzopen() can be used to create
1327 such a file. (Also see gzflush() for another way to do this.) When
1328 appending, gzopen does not test whether the file begins with a gzip stream,
1330 will simply append a gzip stream to the existing file.
1332 gzopen can be used to read a file which is not in gzip format; in this
1333 case gzread will directly read from the file without decompression. When
1337 gzopen returns NULL if the file could not be opened, if there was
1341 file could not be opened.
1346 Associate a gzFile with the file descriptor fd. File descriptors are
1347 obtained from calls like open, dup, creat, pipe or fileno (if the file has
1350 The next call of gzclose on the returned gzFile will also close the file
1351 descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
1355 file descriptor from a FILE *, then you will have to use dup() to avoid
1356 double-close()ing the file descriptor. Both gzclose() and fclose() will
1357 close the associated file descriptor, so they need to have different file
1362 provided, or '+' was provided), or if fd is -1. The file descriptor is not
1367 ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
1369 Set the internal buffer size used by this library's functions for file to
1372 the file. The buffer memory allocation is always deferred to the first read
1383 ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
1385 Dynamically update the compression level and strategy for file. See the
1389 gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
1394 ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
1396 Read and decompress up to len uncompressed bytes from file into buf. If
1397 the input file is not in gzip format, gzread copies the given number of
1398 bytes into the buffer directly from the file.
1402 concatenated in the input file, and will all be decompressed by gzread().
1406 gzread can be used to read a gzip file that is being concurrently written.
1409 gzclearerr can be used to clear the end of file indicator in order to permit
1411 on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
1419 len for end of file, or -1 for error. If len is too large to fit in an int,
1425 gzFile file);
1427 Read and decompress up to nitems items of size size from file into buf,
1434 the end of the file was reached and a full item could not be read, or if
1440 In the event that the end of file is reached and only a partial item is
1443 and the end-of-file flag is set. The length of the partial item read is not
1447 file, resetting and retrying on end-of-file, when size is not 1.
1450 ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
1452 Compress and write the len uncompressed bytes at buf to file. gzwrite
1457 z_size_t nitems, gzFile file);
1459 Compress and write nitems items of size size from buf to file, duplicating
1470 ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
1472 Convert, format, compress, and write the arguments (...) to file under
1485 ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
1487 Compress and write the given null-terminated string s to file, excluding
1493 ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
1495 Read and decompress bytes from file into buf, until len-1 characters are
1497 end-of-file condition is encountered. If any characters are read or if len
1499 are read due to an end-of-file or len is less than one, then the buffer is
1503 for end-of-file or in case of error. If there was an error, the contents at
1507 ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
1509 Compress and write c, converted to an unsigned char, into file. gzputc
1513 ZEXTERN int ZEXPORT gzgetc(gzFile file);
1515 Read and decompress one byte from file. gzgetc returns this byte or -1
1516 in case of end of file or error. This is implemented as a macro for speed.
1518 it does not check to see if file is NULL, nor whether the structure file
1522 ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
1524 Push c back onto the stream for file to be read as the first character on
1534 ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
1536 Flush all pending output to file. The parameter flush is as in the
1550 ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
1554 or gzwrite on file. The offset represents a number of bytes in the
1558 If the file is opened for reading, this function is emulated but can be
1559 extremely slow. If the file is opened for writing, only forward seeks are
1565 particular if the file is opened for writing and the new starting position
1569 ZEXTERN int ZEXPORT gzrewind(gzFile file);
1571 Rewind file. This function is supported only for reading.
1573 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
1577 ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
1579 Return the starting position for the next gzread or gzwrite on file.
1582 the middle of a file using gzdopen().
1584 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
1588 ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
1590 Return the current compressed (actual) read or write offset of file. This
1597 ZEXTERN int ZEXPORT gzeof(gzFile file);
1599 Return true (1) if the end-of-file indicator for file has been set while
1600 reading, false (0) otherwise. Note that the end-of-file indicator is set
1604 number of bytes remaining in the input file. This will happen if the input
1605 file size is an exact multiple of the buffer size.
1608 unless the end-of-file indicator is reset by gzclearerr() and the input file
1609 has grown since the previous end of file was detected.
1612 ZEXTERN int ZEXPORT gzdirect(gzFile file);
1614 Return true (1) if file is being copied directly while reading, or false
1615 (0) if file is a gzip stream being decompressed.
1617 If the input file is empty, gzdirect() will return true, since the input
1621 cause buffers to be allocated to allow reading the file to determine if it
1622 is a gzip file. Therefore if gzbuffer() is used, it should be called before
1630 gzip file reading and decompression, which may not be desired.)
1633 ZEXTERN int ZEXPORT gzclose(gzFile file);
1635 Flush all pending output for file, if necessary, close file and
1636 deallocate the (de)compression state. Note that once file is closed, you
1637 cannot call gzerror with file, since its structures have been deallocated.
1638 gzclose must not be called more than once on the same file, just as free
1641 gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
1642 file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
1646 ZEXTERN int ZEXPORT gzclose_r(gzFile file);
1647 ZEXTERN int ZEXPORT gzclose_w(gzFile file);
1658 ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
1660 Return the error message for the last error which occurred on file.
1661 errnum is set to zlib error number. If an error occurred in the file system
1666 this function may invalidate the previously returned string. If file is
1670 gzerror() should be used to distinguish errors from end-of-file for those
1674 ZEXTERN void ZEXPORT gzclearerr(gzFile file);
1676 Clear the error and end-of-file flags for file. This is analogous to the
1678 file that is being written concurrently.
1841 ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
1860 * without large file support, _LFS64_LARGEFILE must also be true
1957 ZEXTERN int ZEXPORTVA gzvprintf(gzFile file,