@@ -1757,6 +1757,22 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
17571757 len2.
17581758*/
17591759
1760+ /*
1761+ ZEXTERN void ZEXPORT crc32_combine_gen OF((z_crc_t op[32], z_off_t len2));
1762+
1763+ Generate the operator op corresponding to length len2, to be used with
1764+ crc32_combine_op(). op must have room for 32 z_crc_t values. (32 is the
1765+ number of bits in the CRC.)
1766+ */
1767+
1768+ ZEXTERN uLong ZEXPORT crc32_combine_op OF ((uLong crc1 , uLong crc2 ,
1769+ const z_crc_t * op ));
1770+ /*
1771+ Give the same result as crc32_combine(), using op in place of len2. op is
1772+ is generated from len2 by crc32_combine_gen(). This will be faster than
1773+ crc32_combine() if the generated op is used many times.
1774+ */
1775+
17601776
17611777 /* various hacks, don't look :) */
17621778
@@ -1844,6 +1860,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
18441860 ZEXTERN z_off64_t ZEXPORT gzoffset64 OF ((gzFile ));
18451861 ZEXTERN uLong ZEXPORT adler32_combine64 OF ((uLong , uLong , z_off64_t ));
18461862 ZEXTERN uLong ZEXPORT crc32_combine64 OF ((uLong , uLong , z_off64_t ));
1863+ ZEXTERN void ZEXPORT crc32_combine_gen64 OF ((z_crc_t * op , z_off64_t ));
18471864#endif
18481865
18491866#if !defined(ZLIB_INTERNAL ) && defined(Z_WANT64 )
@@ -1854,13 +1871,15 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
18541871# define z_gzoffset z_gzoffset64
18551872# define z_adler32_combine z_adler32_combine64
18561873# define z_crc32_combine z_crc32_combine64
1874+ # define z_crc32_combine_gen z_crc32_combine64_gen
18571875# else
18581876# define gzopen gzopen64
18591877# define gzseek gzseek64
18601878# define gztell gztell64
18611879# define gzoffset gzoffset64
18621880# define adler32_combine adler32_combine64
18631881# define crc32_combine crc32_combine64
1882+ # define crc32_combine_gen crc32_combine_gen64
18641883# endif
18651884# ifndef Z_LARGE64
18661885 ZEXTERN gzFile ZEXPORT gzopen64 OF ((const char * , const char * ) );
@@ -1869,6 +1888,7 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
18691888 ZEXTERN z_off_t ZEXPORT gzoffset64 OF ((gzFile ));
18701889 ZEXTERN uLong ZEXPORT adler32_combine64 OF ((uLong , uLong , z_off_t ));
18711890 ZEXTERN uLong ZEXPORT crc32_combine64 OF ((uLong , uLong , z_off_t ));
1891+ ZEXTERN void ZEXPORT crc32_combine_gen64 OF ((z_crc_t * op , z_off_t ));
18721892# endif
18731893#else
18741894 ZEXTERN gzFile ZEXPORT gzopen OF ((const char * , const char * ) );
@@ -1877,12 +1897,14 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */
18771897 ZEXTERN z_off_t ZEXPORT gzoffset OF ((gzFile ));
18781898 ZEXTERN uLong ZEXPORT adler32_combine OF ((uLong , uLong , z_off_t ));
18791899 ZEXTERN uLong ZEXPORT crc32_combine OF ((uLong , uLong , z_off_t ));
1900+ ZEXTERN void ZEXPORT crc32_combine_gen OF ((z_crc_t * op , z_off_t ));
18801901#endif
18811902
18821903#else /* Z_SOLO */
18831904
18841905 ZEXTERN uLong ZEXPORT adler32_combine OF ((uLong , uLong , z_off_t ));
18851906 ZEXTERN uLong ZEXPORT crc32_combine OF ((uLong , uLong , z_off_t ));
1907+ ZEXTERN void ZEXPORT crc32_combine_gen OF ((z_crc_t * op , z_off_t ));
18861908
18871909#endif /* !Z_SOLO */
18881910
0 commit comments