summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2020-08-31 12:53:58 -0700
committerMark Adler <madler@alumni.caltech.edu>2020-08-31 12:53:58 -0700
commite54494e6bc6dc661269201435f6961b44354fb40 (patch)
treed5e6a0d710a1755ee7b5a40178031242051bc027
parentd71dc66fa8a153fb6e7c626847095d9697a6cf42 (diff)
downloadzlib-e54494e6bc6dc661269201435f6961b44354fb40.tar.gz
zlib-e54494e6bc6dc661269201435f6961b44354fb40.tar.bz2
zlib-e54494e6bc6dc661269201435f6961b44354fb40.zip
Clarify gz* function interfaces, referring to parameter names.
-rw-r--r--zlib.h153
1 files changed, 76 insertions, 77 deletions
diff --git a/zlib.h b/zlib.h
index 18ce433..3bde3a6 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1304,14 +1304,14 @@ typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
1304/* 1304/*
1305ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); 1305ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
1306 1306
1307 Opens a gzip (.gz) file for reading or writing. The mode parameter is as 1307 Open the gzip (.gz) file at path for reading and decompressing, or
1308 in fopen ("rb" or "wb") but can also include a compression level ("wb9") or 1308 compressing and writing. The mode parameter is as in fopen ("rb" or "wb")
1309 a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only 1309 but can also include a compression level ("wb9") or a strategy: 'f' for
1310 compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' 1310 filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",
1311 for fixed code compression as in "wb9F". (See the description of 1311 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
1312 deflateInit2 for more information about the strategy parameter.) 'T' will 1312 as in "wb9F". (See the description of deflateInit2 for more information
1313 request transparent writing or appending with no compression and not using 1313 about the strategy parameter.) 'T' will request transparent writing or
1314 the gzip format. 1314 appending with no compression and not using the gzip format.
1315 1315
1316 "a" can be used instead of "w" to request that the gzip stream that will 1316 "a" can be used instead of "w" to request that the gzip stream that will
1317 be written be appended to the file. "+" will result in an error, since 1317 be written be appended to the file. "+" will result in an error, since
@@ -1341,9 +1341,9 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
1341 1341
1342ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); 1342ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
1343/* 1343/*
1344 gzdopen associates a gzFile with the file descriptor fd. File descriptors 1344 Associate a gzFile with the file descriptor fd. File descriptors are
1345 are obtained from calls like open, dup, creat, pipe or fileno (if the file 1345 obtained from calls like open, dup, creat, pipe or fileno (if the file has
1346 has been previously opened with fopen). The mode parameter is as in gzopen. 1346 been previously opened with fopen). The mode parameter is as in gzopen.
1347 1347
1348 The next call of gzclose on the returned gzFile will also close the file 1348 The next call of gzclose on the returned gzFile will also close the file
1349 descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor 1349 descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
@@ -1364,13 +1364,13 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
1364 1364
1365ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); 1365ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
1366/* 1366/*
1367 Set the internal buffer size used by this library's functions. The 1367 Set the internal buffer size used by this library's functions for file to
1368 default buffer size is 8192 bytes. This function must be called after 1368 size. The default buffer size is 8192 bytes. This function must be called
1369 gzopen() or gzdopen(), and before any other calls that read or write the 1369 after gzopen() or gzdopen(), and before any other calls that read or write
1370 file. The buffer memory allocation is always deferred to the first read or 1370 the file. The buffer memory allocation is always deferred to the first read
1371 write. Three times that size in buffer space is allocated. A larger buffer 1371 or write. Three times that size in buffer space is allocated. A larger
1372 size of, for example, 64K or 128K bytes will noticeably increase the speed 1372 buffer size of, for example, 64K or 128K bytes will noticeably increase the
1373 of decompression (reading). 1373 speed of decompression (reading).
1374 1374
1375 The new buffer size also affects the maximum length for gzprintf(). 1375 The new buffer size also affects the maximum length for gzprintf().
1376 1376
@@ -1380,9 +1380,9 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
1380 1380
1381ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); 1381ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
1382/* 1382/*
1383 Dynamically update the compression level or strategy. See the description 1383 Dynamically update the compression level and strategy for file. See the
1384 of deflateInit2 for the meaning of these parameters. Previously provided 1384 description of deflateInit2 for the meaning of these parameters. Previously
1385 data is flushed before the parameter change. 1385 provided data is flushed before applying the parameter changes.
1386 1386
1387 gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not 1387 gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
1388 opened for writing, Z_ERRNO if there is an error writing the flushed data, 1388 opened for writing, Z_ERRNO if there is an error writing the flushed data,
@@ -1391,7 +1391,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
1391 1391
1392ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); 1392ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
1393/* 1393/*
1394 Reads the given number of uncompressed bytes from the compressed file. If 1394 Read and decompress up to len uncompressed bytes from file into buf. If
1395 the input file is not in gzip format, gzread copies the given number of 1395 the input file is not in gzip format, gzread copies the given number of
1396 bytes into the buffer directly from the file. 1396 bytes into the buffer directly from the file.
1397 1397
@@ -1422,11 +1422,11 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
1422ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, 1422ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
1423 gzFile file)); 1423 gzFile file));
1424/* 1424/*
1425 Read up to nitems items of size size from file to buf, otherwise operating 1425 Read and decompress up to nitems items of size size from file into buf,
1426 as gzread() does. This duplicates the interface of stdio's fread(), with 1426 otherwise operating as gzread() does. This duplicates the interface of
1427 size_t request and return types. If the library defines size_t, then 1427 stdio's fread(), with size_t request and return types. If the library
1428 z_size_t is identical to size_t. If not, then z_size_t is an unsigned 1428 defines size_t, then z_size_t is identical to size_t. If not, then z_size_t
1429 integer type that can contain a pointer. 1429 is an unsigned integer type that can contain a pointer.
1430 1430
1431 gzfread() returns the number of full items read of size size, or zero if 1431 gzfread() returns the number of full items read of size size, or zero if
1432 the end of the file was reached and a full item could not be read, or if 1432 the end of the file was reached and a full item could not be read, or if
@@ -1445,18 +1445,16 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems,
1445 file, reseting and retrying on end-of-file, when size is not 1. 1445 file, reseting and retrying on end-of-file, when size is not 1.
1446*/ 1446*/
1447 1447
1448ZEXTERN int ZEXPORT gzwrite OF((gzFile file, 1448ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len));
1449 voidpc buf, unsigned len));
1450/* 1449/*
1451 Writes the given number of uncompressed bytes into the compressed file. 1450 Compress and write the len uncompressed bytes at buf to file. gzwrite
1452 gzwrite returns the number of uncompressed bytes written or 0 in case of 1451 returns the number of uncompressed bytes written or 0 in case of error.
1453 error.
1454*/ 1452*/
1455 1453
1456ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, 1454ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
1457 z_size_t nitems, gzFile file)); 1455 z_size_t nitems, gzFile file));
1458/* 1456/*
1459 gzfwrite() writes nitems items of size size from buf to file, duplicating 1457 Compress and write nitems items of size size from buf to file, duplicating
1460 the interface of stdio's fwrite(), with size_t request and return types. If 1458 the interface of stdio's fwrite(), with size_t request and return types. If
1461 the library defines size_t, then z_size_t is identical to size_t. If not, 1459 the library defines size_t, then z_size_t is identical to size_t. If not,
1462 then z_size_t is an unsigned integer type that can contain a pointer. 1460 then z_size_t is an unsigned integer type that can contain a pointer.
@@ -1469,22 +1467,22 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size,
1469 1467
1470ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); 1468ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
1471/* 1469/*
1472 Converts, formats, and writes the arguments to the compressed file under 1470 Convert, format, compress, and write the arguments (...) to file under
1473 control of the format string, as in fprintf. gzprintf returns the number of 1471 control of the string format, as in fprintf. gzprintf returns the number of
1474 uncompressed bytes actually written, or a negative zlib error code in case 1472 uncompressed bytes actually written, or a negative zlib error code in case
1475 of error. The number of uncompressed bytes written is limited to 8191, or 1473 of error. The number of uncompressed bytes written is limited to 8191, or
1476 one less than the buffer size given to gzbuffer(). The caller should assure 1474 one less than the buffer size given to gzbuffer(). The caller should assure
1477 that this limit is not exceeded. If it is exceeded, then gzprintf() will 1475 that this limit is not exceeded. If it is exceeded, then gzprintf() will
1478 return an error (0) with nothing written. In this case, there may also be a 1476 return an error (0) with nothing written. In this case, there may also be a
1479 buffer overflow with unpredictable consequences, which is possible only if 1477 buffer overflow with unpredictable consequences, which is possible only if
1480 zlib was compiled with the insecure functions sprintf() or vsprintf() 1478 zlib was compiled with the insecure functions sprintf() or vsprintf(),
1481 because the secure snprintf() or vsnprintf() functions were not available. 1479 because the secure snprintf() or vsnprintf() functions were not available.
1482 This can be determined using zlibCompileFlags(). 1480 This can be determined using zlibCompileFlags().
1483*/ 1481*/
1484 1482
1485ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); 1483ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
1486/* 1484/*
1487 Writes the given null-terminated string to the compressed file, excluding 1485 Compress and write the given null-terminated string s to file, excluding
1488 the terminating null character. 1486 the terminating null character.
1489 1487
1490 gzputs returns the number of characters written, or -1 in case of error. 1488 gzputs returns the number of characters written, or -1 in case of error.
@@ -1492,11 +1490,12 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
1492 1490
1493ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); 1491ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
1494/* 1492/*
1495 Reads bytes from the compressed file until len-1 characters are read, or a 1493 Read and decompress bytes from file into buf, until len-1 characters are
1496 newline character is read and transferred to buf, or an end-of-file 1494 read, or until a newline character is read and transferred to buf, or an
1497 condition is encountered. If any characters are read or if len == 1, the 1495 end-of-file condition is encountered. If any characters are read or if len
1498 string is terminated with a null character. If no characters are read due 1496 is one, the string is terminated with a null character. If no characters
1499 to an end-of-file or len < 1, then the buffer is left untouched. 1497 are read due to an end-of-file or len is less than one, then the buffer is
1498 left untouched.
1500 1499
1501 gzgets returns buf which is a null-terminated string, or it returns NULL 1500 gzgets returns buf which is a null-terminated string, or it returns NULL
1502 for end-of-file or in case of error. If there was an error, the contents at 1501 for end-of-file or in case of error. If there was an error, the contents at
@@ -1505,13 +1504,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
1505 1504
1506ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); 1505ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
1507/* 1506/*
1508 Writes c, converted to an unsigned char, into the compressed file. gzputc 1507 Compress and write c, converted to an unsigned char, into file. gzputc
1509 returns the value that was written, or -1 in case of error. 1508 returns the value that was written, or -1 in case of error.
1510*/ 1509*/
1511 1510
1512ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); 1511ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
1513/* 1512/*
1514 Reads one byte from the compressed file. gzgetc returns this byte or -1 1513 Read and decompress one byte from file. gzgetc returns this byte or -1
1515 in case of end of file or error. This is implemented as a macro for speed. 1514 in case of end of file or error. This is implemented as a macro for speed.
1516 As such, it does not do all of the checking the other functions do. I.e. 1515 As such, it does not do all of the checking the other functions do. I.e.
1517 it does not check to see if file is NULL, nor whether the structure file 1516 it does not check to see if file is NULL, nor whether the structure file
@@ -1520,8 +1519,8 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
1520 1519
1521ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); 1520ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
1522/* 1521/*
1523 Push one character back onto the stream to be read as the first character 1522 Push c back onto the stream for file to be read as the first character on
1524 on the next read. At least one character of push-back is allowed. 1523 the next read. At least one character of push-back is always allowed.
1525 gzungetc() returns the character pushed, or -1 on failure. gzungetc() will 1524 gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
1526 fail if c is -1, and may fail if a character has been pushed but not read 1525 fail if c is -1, and may fail if a character has been pushed but not read
1527 yet. If gzungetc is used immediately after gzopen or gzdopen, at least the 1526 yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
@@ -1532,9 +1531,9 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
1532 1531
1533ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); 1532ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
1534/* 1533/*
1535 Flushes all pending output into the compressed file. The parameter flush 1534 Flush all pending output to file. The parameter flush is as in the
1536 is as in the deflate() function. The return value is the zlib error number 1535 deflate() function. The return value is the zlib error number (see function
1537 (see function gzerror below). gzflush is only permitted when writing. 1536 gzerror below). gzflush is only permitted when writing.
1538 1537
1539 If the flush parameter is Z_FINISH, the remaining data is written and the 1538 If the flush parameter is Z_FINISH, the remaining data is written and the
1540 gzip stream is completed in the output. If gzwrite() is called again, a new 1539 gzip stream is completed in the output. If gzwrite() is called again, a new
@@ -1549,8 +1548,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
1549ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, 1548ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
1550 z_off_t offset, int whence)); 1549 z_off_t offset, int whence));
1551 1550
1552 Sets the starting position for the next gzread or gzwrite on the given 1551 Set the starting position to offset relative to whence for the next gzread
1553 compressed file. The offset represents a number of bytes in the 1552 or gzwrite on file. The offset represents a number of bytes in the
1554 uncompressed data stream. The whence parameter is defined as in lseek(2); 1553 uncompressed data stream. The whence parameter is defined as in lseek(2);
1555 the value SEEK_END is not supported. 1554 the value SEEK_END is not supported.
1556 1555
@@ -1567,18 +1566,18 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
1567 1566
1568ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); 1567ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
1569/* 1568/*
1570 Rewinds the given file. This function is supported only for reading. 1569 Rewind file. This function is supported only for reading.
1571 1570
1572 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) 1571 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
1573*/ 1572*/
1574 1573
1575/* 1574/*
1576ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); 1575ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
1577 1576
1578 Returns the starting position for the next gzread or gzwrite on the given 1577 Return the starting position for the next gzread or gzwrite on file.
1579 compressed file. This position represents a number of bytes in the 1578 This position represents a number of bytes in the uncompressed data stream,
1580 uncompressed data stream, and is zero when starting, even if appending or 1579 and is zero when starting, even if appending or reading a gzip stream from
1581 reading a gzip stream from the middle of a file using gzdopen(). 1580 the middle of a file using gzdopen().
1582 1581
1583 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) 1582 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
1584*/ 1583*/
@@ -1586,22 +1585,22 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
1586/* 1585/*
1587ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); 1586ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
1588 1587
1589 Returns the current offset in the file being read or written. This offset 1588 Return the current compressed (actual) read or write offset of file. This
1590 includes the count of bytes that precede the gzip stream, for example when 1589 offset includes the count of bytes that precede the gzip stream, for example
1591 appending or when using gzdopen() for reading. When reading, the offset 1590 when appending or when using gzdopen() for reading. When reading, the
1592 does not include as yet unused buffered input. This information can be used 1591 offset does not include as yet unused buffered input. This information can
1593 for a progress indicator. On error, gzoffset() returns -1. 1592 be used for a progress indicator. On error, gzoffset() returns -1.
1594*/ 1593*/
1595 1594
1596ZEXTERN int ZEXPORT gzeof OF((gzFile file)); 1595ZEXTERN int ZEXPORT gzeof OF((gzFile file));
1597/* 1596/*
1598 Returns true (1) if the end-of-file indicator has been set while reading, 1597 Return true (1) if the end-of-file indicator for file has been set while
1599 false (0) otherwise. Note that the end-of-file indicator is set only if the 1598 reading, false (0) otherwise. Note that the end-of-file indicator is set
1600 read tried to go past the end of the input, but came up short. Therefore, 1599 only if the read tried to go past the end of the input, but came up short.
1601 just like feof(), gzeof() may return false even if there is no more data to 1600 Therefore, just like feof(), gzeof() may return false even if there is no
1602 read, in the event that the last read request was for the exact number of 1601 more data to read, in the event that the last read request was for the exact
1603 bytes remaining in the input file. This will happen if the input file size 1602 number of bytes remaining in the input file. This will happen if the input
1604 is an exact multiple of the buffer size. 1603 file size is an exact multiple of the buffer size.
1605 1604
1606 If gzeof() returns true, then the read functions will return no more data, 1605 If gzeof() returns true, then the read functions will return no more data,
1607 unless the end-of-file indicator is reset by gzclearerr() and the input file 1606 unless the end-of-file indicator is reset by gzclearerr() and the input file
@@ -1610,7 +1609,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file));
1610 1609
1611ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); 1610ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
1612/* 1611/*
1613 Returns true (1) if file is being copied directly while reading, or false 1612 Return true (1) if file is being copied directly while reading, or false
1614 (0) if file is a gzip stream being decompressed. 1613 (0) if file is a gzip stream being decompressed.
1615 1614
1616 If the input file is empty, gzdirect() will return true, since the input 1615 If the input file is empty, gzdirect() will return true, since the input
@@ -1631,8 +1630,8 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
1631 1630
1632ZEXTERN int ZEXPORT gzclose OF((gzFile file)); 1631ZEXTERN int ZEXPORT gzclose OF((gzFile file));
1633/* 1632/*
1634 Flushes all pending output if necessary, closes the compressed file and 1633 Flush all pending output for file, if necessary, close file and
1635 deallocates the (de)compression state. Note that once file is closed, you 1634 deallocate the (de)compression state. Note that once file is closed, you
1636 cannot call gzerror with file, since its structures have been deallocated. 1635 cannot call gzerror with file, since its structures have been deallocated.
1637 gzclose must not be called more than once on the same file, just as free 1636 gzclose must not be called more than once on the same file, just as free
1638 must not be called more than once on the same allocation. 1637 must not be called more than once on the same allocation.
@@ -1656,10 +1655,10 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
1656 1655
1657ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); 1656ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
1658/* 1657/*
1659 Returns the error message for the last error which occurred on the given 1658 Return the error message for the last error which occurred on file.
1660 compressed file. errnum is set to zlib error number. If an error occurred 1659 errnum is set to zlib error number. If an error occurred in the file system
1661 in the file system and not in the compression library, errnum is set to 1660 and not in the compression library, errnum is set to Z_ERRNO and the
1662 Z_ERRNO and the application may consult errno to get the exact error code. 1661 application may consult errno to get the exact error code.
1663 1662
1664 The application must not modify the returned string. Future calls to 1663 The application must not modify the returned string. Future calls to
1665 this function may invalidate the previously returned string. If file is 1664 this function may invalidate the previously returned string. If file is
@@ -1672,7 +1671,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
1672 1671
1673ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); 1672ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
1674/* 1673/*
1675 Clears the error and end-of-file flags for file. This is analogous to the 1674 Clear the error and end-of-file flags for file. This is analogous to the
1676 clearerr() function in stdio. This is useful for continuing to read a gzip 1675 clearerr() function in stdio. This is useful for continuing to read a gzip
1677 file that is being written concurrently. 1676 file that is being written concurrently.
1678*/ 1677*/