Changeset View
Changeset View
Standalone View
Standalone View
sys/modules/zlib/README
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
0 - legacy zlib in kernel was NO_GZIP. | |||||
- Few #include adjustments are made to compile ZLIB in kernel | |||||
with -DNO_GZIP option and few other tweaks. | |||||
- Adjusted Z_SOLO to include compress(), compress2(), and uncompress(). | |||||
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. | |||||
-I contrib/zlib | |||||
-I sys/contrib/zstd/lib/freebsd | |||||
-DZ_PREIFX - this conflicts with zfs z_compress. However, zlib's zconf.h | |||||
-DHAVE_MEMCPY for zlib so that it uses libkern mem* functions. | |||||
zstd/lib/freebsd/stdlib.h helps zlib to use kernel malloc/free/callc | |||||
in zcalloc/zcfree in zutil.c. | |||||
4 - NO_GZIP compile condition has been adjusted in zlib. | |||||
5 - Added compress.c and uncompr.c for kernel to use z_compress, z_compress2, | |||||
z_uncompress, z_uncompress2, and z_compressBound. | |||||
6 - opencryptodeflate.c | |||||
zfs.state->dummy is an address and doesn't seem to be useful. | |||||
Its DTRACE probe is removed. | |||||
7 - ZFS had had its own copy of zlib, too. | |||||
sys/cddl/contrib/opensolaris/uts/common/zmod has zlib | |||||
version 1.2.3 in 2005. | |||||
- ZFS had attached its own zcalloc/zcfree to zmod's zlib. | |||||
- ZFS had been #define'ing compress to zz_compress, compress2 to | |||||
zz_compress2, and uncompress to zz_uncompress . | |||||
- ZFS had had own implementaton of z_compress and z_uncompress and | |||||
had its own API called z_compress_level(). | |||||
- ZFS uses gzip and zlib cannot be compiled with NO_GZIP. | |||||
8 - Zalloc/zfrees are renamed for ease of distinguishing these functions. | |||||
Each of these is passed for zlib to allocate and free memory. | |||||
Each zalloc/zfree pair allocates differently and that is reasonable. | |||||
They are in if_mxge.c, g_unzip_zlib.c, kern_ctf.c, subr_compressor.c, | |||||
ng_deflate.c(okay), cryptodeflate.c, and zmod.c in zfs. | |||||
9 - 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. | |||||
Prefixed with ng_ for inflate() and deflate() to emphasize that | |||||
these are the FreeBSD specific implementations. | |||||
All of ng_zlib.h functions are marked static. | |||||
TODOs | |||||
1 - We move contrib/zlib to sys/contrib/zlib. |