========================================================================= */
| 721 | |
| 722 | /* ========================================================================= */ |
| 723 | int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) { |
| 724 | deflate_state *s; |
| 725 | int put; |
| 726 | |
| 727 | if (deflateStateCheck(strm)) return Z_STREAM_ERROR; |
| 728 | s = strm->state; |
| 729 | #ifdef LIT_MEM |
| 730 | if (bits < 0 || bits > 16 || |
| 731 | (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3)) |
| 732 | return Z_BUF_ERROR; |
| 733 | #else |
| 734 | if (bits < 0 || bits > 16 || |
| 735 | s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) |
| 736 | return Z_BUF_ERROR; |
| 737 | #endif |
| 738 | do { |
| 739 | put = Buf_size - s->bi_valid; |
| 740 | if (put > bits) |
| 741 | put = bits; |
| 742 | s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid); |
| 743 | s->bi_valid += put; |
| 744 | _tr_flush_bits(s); |
| 745 | value >>= put; |
| 746 | bits -= put; |
| 747 | } while (bits); |
| 748 | return Z_OK; |
| 749 | } |
| 750 | |
| 751 | /* ========================================================================= */ |
| 752 | int ZEXPORT deflateParams(z_streamp strm, int level, int strategy) { |
nothing calls this directly
no test coverage detected