Below summary is added to new sys/sys/zlib.h and copied to here
#1 - sys/crc32.h is split out of sys/libkern.h to avoid conflicts
between zlib's crc32 and system crc32.
#2 - Use contrib/zstd/lib/freebsd's stdlib compatible includes.
#3 - ZLIB_C is created con/kern.pre.mk to share compile paths.
#4 - sys/zlib.h defines these.opencryptodeflate.c
Z_PREIFXzfs.state->dummy is an address and doesn't seem to be useful.
NO_GZIPIts DTRACE probe is removed.
Z_SOLO - this is for libkern/zlib.c and not needed for clients of zlib#5 - zfs has its own copy of zlib, too.
#5 - - sys/cddl/contrib/opencryptodeflate.csolaris/uts/common/zmod has zlib
zfs.state->dummy is an address and doesn't seem to be useful. version 1.2.3 in 2005
Its DTRACE probe is - However, it looks this code is not used and removed.
#6 - netgraph/deflate.c needs and uses FreeBSD enhancements to zlib.
Moved sys/zlib.h to netgraph/ng_zlib.h, sys/libkern/zlib.c to
netgraph/ng_zlib.c, and netgraph/deflate.c includes netgraph/ng_zlib.c
to compile as a part of deflate.c.
We may consider dropping functions with the samePrefixed with ng_ for inflate() and deflate() to emphasize that
these are the FreeBSD specific implementations.
as contrib/All of ng_zlib from netgraph/zlib.c. However, this efforts.h functions are marked static.
require exposing static functions to general public1 - Should we move contrib/zlib to sys/contrib/zlib?
2 - GZIP APIs are redefined in multiple places as static functions.