Home | History | Annotate | Download | only in compress

Lines Matching defs:BITS

58  * zopen(filename, mode, bits)
76 #define BITS 16 /* Default bits. */
79 /* A code_int must be able to hold 2**BITS values of type int, and also -1. */
94 #define INIT_BITS 9 /* Initial number of bits/code. */
104 int zs_n_bits; /* Number of bits/code. */
105 int zs_maxbits; /* User settable max # bits/code. */
124 char_type zs_buf[BITS];
137 char_type zs_gbuf[BITS];
179 * the codetab. The tab_suffix table needs 2**BITS characters. We get this
190 #define de_stack ((char_type *)&tab_suffixof(1 << BITS))
356 * Chars are 8 bits long.
358 * Maintain a BITS character long buffer (so that 8 codes will
371 int bits, r_off;
375 bits = n_bits;
382 * Since ocode is always >= 8 bits, only need to mask the first
387 bits -= (8 - r_off);
389 /* Get any 8 bit parts in the middle (<=1 for up to 16 bits). */
390 if (bits >= 8) {
393 bits -= 8;
395 /* Last bits. */
396 if (bits)
401 bits = n_bits;
402 bytes_out += bits;
403 if (fwrite(bp, sizeof(char), bits, fp) != (size_t)bits)
405 bp += bits;
406 bits = 0;
489 if (maxbits > BITS || maxbits < 12) {
529 * bound by 1 << BITS - 256.
571 int r_off, bits;
600 bits = n_bits;
606 /* Get first part (low order bits). */
608 bits -= (8 - r_off);
611 /* Get any 8 bit parts in the middle (<=1 for up to 16 bits). */
612 if (bits >= 8) {
615 bits -= 8;
618 /* High order bits. */
619 gcode |= (*bp & rmask[bits]) << r_off;
639 rat = (in_count << 8) / bytes_out; /* 8 fractional bits. */
654 zopen(const char *fname, const char *mode, int bits)
659 bits < 0 || bits > BITS) {
667 maxbits = bits ? bits : BITS; /* User settable max # bits/code. */