zbuf
uint8_t zbuf[8192] = {0, };
size_t writenow = MIN(filesize, (off_t)sizeof(zbuf));
if ((size_t)write(fd, zbuf, writenow) != writenow) {
if (write(fd, zbuf, 1) != 1) {
uint8_t zbuf[8192] = {0, };
(off_t)sizeof(zbuf));
if ((size_t)write(fd, zbuf, writenow) !=
if (write(fd, zbuf, 1) != 1) {
__forceinline static int zget8(zbuf *z)
static void fill_bits(zbuf *z)
__forceinline static unsigned int zreceive(zbuf *z, int n)
__forceinline static int zhuffman_decode(zbuf *a, zhuffman *z)
static int expand(zbuf *z, int n) // need to make room for n bytes
static int parse_huffman_block(zbuf *a)
static int compute_huffman_codes(zbuf *a)
static int parse_uncompressed_block(zbuf *a)
static int parse_zlib_header(zbuf *a)
static int parse_zlib(zbuf *a, int parse_header)
static int do_zlib(zbuf *a, char *obuf, int olen, int exp, int parse_header)
zbuf *a;
zbuf *a;
zbuf *a;
zbuf *a;
zbuf *a;
zbuf.next_out = buf[0].out;
zbuf.avail_out = buf[0].size;
error = decomp ? inflateInit2(&zbuf, window_inflate) :
deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD,
error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) :
deflate(&zbuf, Z_FINISH);
&& zbuf.avail_in == 0 && zbuf.avail_out != 0)
else if (zbuf.avail_out == 0) {
zbuf.next_out = buf[i].out;
zbuf.avail_out = buf[i].size = nextsize;
result = count = zbuf.total_out;
inflateEnd(&zbuf);
deflateEnd(&zbuf);
inflateEnd(&zbuf);
deflateEnd(&zbuf);
z_stream zbuf;
memset(&zbuf, 0, sizeof(z_stream));
zbuf.zalloc = ocf_zalloc;
zbuf.zfree = ocf_zfree;
zbuf.opaque = Z_NULL;
zbuf.avail_in = size; /* Total length of data to be processed */
zbuf.next_in = data; /* data that is going to be processed */
zbuf.next_in = data + sizeof(gzip_header);
zbuf.avail_in = size - sizeof(gzip_header) - GZIP_TAIL_SIZE;
zbuf.next_out = buf[0].out;
zbuf.avail_out = buf[0].size;
zbuf.avail_in, zbuf.avail_out);
error = decomp ? inflateInit2(&zbuf, window_inflate) :
deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD,
zbuf.avail_in, zbuf.avail_out);
error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) :
deflate(&zbuf, Z_FINISH);
zbuf.avail_in, zbuf.avail_out);
&& zbuf.avail_in == 0 && zbuf.avail_out != 0)
else if (zbuf.avail_out == 0) {
zbuf.next_out = buf[i].out;
zbuf.avail_out = buf[i].size = nextsize;
count = result = zbuf.total_out;
result = zbuf.total_out + sizeof(gzip_header) + GZIP_TAIL_SIZE;
count = zbuf.total_out;
inflateEnd(&zbuf);
deflateEnd(&zbuf);
inflateEnd(&zbuf);
deflateEnd(&zbuf);
z_stream zbuf;
memset(&zbuf, 0, sizeof(z_stream));
zbuf.next_in = data; /* data that is going to be processed */
zbuf.zalloc = ocf_zalloc;
zbuf.zfree = ocf_zfree;
zbuf.opaque = Z_NULL;
zbuf.avail_in = size; /* Total length of data to be processed */
char *zbuf;
zbuf = calloc(1, (unsigned int)dp->d_secsize);
if (zbuf == NULL)
free(zbuf);
if (nflag == 0 && (size_t)write(f, zbuf, dp->d_secsize) != dp->d_secsize)
free(zbuf);
char *zbuf;
if ((zbuf = malloc(biggest)) == NULL)
(void)memset(zbuf, 0, biggest);
if ((size_t)kvm_write(kvp->kd, (u_long)kvp->gpm.kcount, zbuf,
if ((size_t)kvm_write(kvp->kd, (u_long)kvp->gpm.froms, zbuf,
if ((size_t)kvm_write(kvp->kd, (u_long)kvp->gpm.tos, zbuf,
free(zbuf);
if (sysctl(mib, miblen, NULL, NULL, zbuf, (size_t)kvp->gpm.kcountsize) < 0)
if (sysctl(mib, miblen, NULL, NULL, zbuf, (size_t)kvp->gpm.fromssize) < 0)
if (sysctl(mib, miblen, NULL, NULL, zbuf, (size_t)kvp->gpm.tossize) < 0)
free(zbuf);