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
573 file name, no extra data, no comment, no modification time (set to zero), no
822 gzip file" and give up.
1094 the version of the header file.
1107 inflate() for file i/o applications, in that it avoids copying between the
1296 /* gzip file access functions */
1305 typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
1310 Open the gzip (.gz) file at path for reading and decompressing, or
1320 be written be appended to the file. "+" will result in an error, since
1321 reading and writing to the same gzip file is not supported. The addition of
1322 "x" when writing will create the file exclusively, which fails if the file
1324 reading or writing will set the flag to close the file on an execve() call.
1327 streams in a file. The append function of gzopen() can be used to create
1328 such a file. (Also see gzflush() for another way to do this.) When
1329 appending, gzopen does not test whether the file begins with a gzip stream,
1331 will simply append a gzip stream to the existing file.
1333 gzopen can be used to read a file which is not in gzip format; in this
1334 case gzread will directly read from the file without decompression. When
1338 gzopen returns NULL if the file could not be opened, if there was
1342 file could not be opened.
1347 Associate a gzFile with the file descriptor fd. File descriptors are
1348 obtained from calls like open, dup, creat, pipe or fileno (if the file has
1351 The next call of gzclose on the returned gzFile will also close the file
1352 descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
1356 file descriptor from a FILE *, then you will have to use dup() to avoid
1357 double-close()ing the file descriptor. Both gzclose() and fclose() will
1358 close the associated file descriptor, so they need to have different file
1363 provided, or '+' was provided), or if fd is -1. The file descriptor is not
1368 ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
1370 Set the internal buffer size used by this library's functions for file to
1373 the file. The buffer memory allocation is always deferred to the first read
1384 ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
1386 Dynamically update the compression level and strategy for file. See the
1390 gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
1395 ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
1397 Read and decompress up to len uncompressed bytes from file into buf. If
1398 the input file is not in gzip format, gzread copies the given number of
1399 bytes into the buffer directly from the file.
1403 concatenated in the input file, and will all be decompressed by gzread().
1407 gzread can be used to read a gzip file that is being concurrently written.
1410 gzclearerr can be used to clear the end of file indicator in order to permit
1412 on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
1420 len for end of file, or -1 for error. If len is too large to fit in an int,
1426 gzFile file);
1428 Read and decompress up to nitems items of size size from file into buf,
1435 the end of the file was reached and a full item could not be read, or if
1441 In the event that the end of file is reached and only a partial item is
1444 and the end-of-file flag is set. The length of the partial item read is not
1448 file, resetting and retrying on end-of-file, when size is not 1.
1451 ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
1453 Compress and write the len uncompressed bytes at buf to file. gzwrite
1458 z_size_t nitems, gzFile file);
1460 Compress and write nitems items of size size from buf to file, duplicating
1471 ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
1473 Convert, format, compress, and write the arguments (...) to file under
1486 ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
1488 Compress and write the given null-terminated string s to file, excluding
1494 ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
1496 Read and decompress bytes from file into buf, until len-1 characters are
1498 end-of-file condition is encountered. If any characters are read or if len
1500 are read due to an end-of-file or len is less than one, then the buffer is
1504 for end-of-file or in case of error. If there was an error, the contents at
1508 ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
1510 Compress and write c, converted to an unsigned char, into file. gzputc
1514 ZEXTERN int ZEXPORT gzgetc(gzFile file);
1516 Read and decompress one byte from file. gzgetc returns this byte or -1
1517 in case of end of file or error. This is implemented as a macro for speed.
1519 it does not check to see if file is NULL, nor whether the structure file
1523 ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
1525 Push c back onto the stream for file to be read as the first character on
1535 ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
1537 Flush all pending output to file. The parameter flush is as in the
1551 ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
1555 or gzwrite on file. The offset represents a number of bytes in the
1559 If the file is opened for reading, this function is emulated but can be
1560 extremely slow. If the file is opened for writing, only forward seeks are
1566 particular if the file is opened for writing and the new starting position
1570 ZEXTERN int ZEXPORT gzrewind(gzFile file);
1572 Rewind file. This function is supported only for reading.
1574 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
1578 ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
1580 Return the starting position for the next gzread or gzwrite on file.
1583 the middle of a file using gzdopen().
1585 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
1589 ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
1591 Return the current compressed (actual) read or write offset of file. This
1598 ZEXTERN int ZEXPORT gzeof(gzFile file);
1600 Return true (1) if the end-of-file indicator for file has been set while
1601 reading, false (0) otherwise. Note that the end-of-file indicator is set
1605 number of bytes remaining in the input file. This will happen if the input
1606 file size is an exact multiple of the buffer size.
1609 unless the end-of-file indicator is reset by gzclearerr() and the input file
1610 has grown since the previous end of file was detected.
1613 ZEXTERN int ZEXPORT gzdirect(gzFile file);
1615 Return true (1) if file is being copied directly while reading, or false
1616 (0) if file is a gzip stream being decompressed.
1618 If the input file is empty, gzdirect() will return true, since the input
1622 cause buffers to be allocated to allow reading the file to determine if it
1623 is a gzip file. Therefore if gzbuffer() is used, it should be called before
1631 gzip file reading and decompression, which may not be desired.)
1634 ZEXTERN int ZEXPORT gzclose(gzFile file);
1636 Flush all pending output for file, if necessary, close file and
1637 deallocate the (de)compression state. Note that once file is closed, you
1638 cannot call gzerror with file, since its structures have been deallocated.
1639 gzclose must not be called more than once on the same file, just as free
1642 gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
1643 file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
1647 ZEXTERN int ZEXPORT gzclose_r(gzFile file);
1648 ZEXTERN int ZEXPORT gzclose_w(gzFile file);
1659 ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
1661 Return the error message for the last error which occurred on file.
1662 errnum is set to zlib error number. If an error occurred in the file system
1667 this function may invalidate the previously returned string. If file is
1671 gzerror() should be used to distinguish errors from end-of-file for those
1675 ZEXTERN void ZEXPORT gzclearerr(gzFile file);
1677 Clear the error and end-of-file flags for file. This is analogous to the
1679 file that is being written concurrently.
1842 ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
1856 * without large file support, _LFS64_LARGEFILE must also be true
1928 ZEXTERN int ZEXPORTVA gzvprintf(gzFile file,