Lines Matching refs:zlib
55 } zlib; variable
97 if (zlib.z_dlp != NULL) in ctf_zopen()
98 return (zlib.z_dlp); /* library is already loaded */ in ctf_zopen()
103 if ((zlib.z_dlp = dlopen(_libctf_zlib, RTLD_LAZY | RTLD_LOCAL)) == NULL) in ctf_zopen()
106 zlib.z_uncompress = (int (*)()) dlsym(zlib.z_dlp, "uncompress"); in ctf_zopen()
107 zlib.z_initcomp = (int (*)()) dlsym(zlib.z_dlp, "deflateInit_"); in ctf_zopen()
108 zlib.z_compress = (int (*)()) dlsym(zlib.z_dlp, "deflate"); in ctf_zopen()
109 zlib.z_finicomp = (int (*)()) dlsym(zlib.z_dlp, "deflateEnd"); in ctf_zopen()
110 zlib.z_error = (const char *(*)()) dlsym(zlib.z_dlp, "zError"); in ctf_zopen()
112 if (zlib.z_uncompress == NULL || zlib.z_error == NULL || in ctf_zopen()
113 zlib.z_initcomp == NULL|| zlib.z_compress == NULL || in ctf_zopen()
114 zlib.z_finicomp == NULL) { in ctf_zopen()
115 (void) dlclose(zlib.z_dlp); in ctf_zopen()
116 bzero(&zlib, sizeof (zlib)); in ctf_zopen()
120 return (zlib.z_dlp); in ctf_zopen()
130 return (zlib.z_uncompress(dst, (ulong_t *)dstlen, src, srclen)); in z_uncompress()
136 return (zlib.z_error(err)); in z_strerror()
158 if (zlib.z_initcomp(&czd->czd_zstr, Z_BEST_COMPRESSION, in ctf_zdata_init()
209 if ((err = zlib.z_compress(&czd->czd_zstr, Z_NO_FLUSH)) != Z_OK) in ctf_zdata_compress_buffer()
232 err = zlib.z_compress(&czd->czd_zstr, flag); in ctf_zdata_flush()
254 if ((ret = zlib.z_finicomp(&czd->czd_zstr)) != 0) in ctf_zdata_end()
264 (void) zlib.z_finicomp(&czd->czd_zstr); in ctf_zdata_cleanup()
326 if ((err = zlib.z_initcomp(&zs, Z_BEST_COMPRESSION, ZLIB_VERSION, in z_compress()
330 if ((err = zlib.z_compress(&zs, Z_FINISH)) != Z_STREAM_END) { in z_compress()
331 (void) zlib.z_finicomp(&zs); in z_compress()
336 return (zlib.z_finicomp(&zs)); in z_compress()