diff options
Diffstat (limited to 'zlib.h')
-rw-r--r-- | zlib.h | 35 |
1 files changed, 18 insertions, 17 deletions
@@ -695,24 +695,25 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, | |||
695 | new level and strategy will take effect at the next call of deflate(). | 695 | new level and strategy will take effect at the next call of deflate(). |
696 | 696 | ||
697 | If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does | 697 | If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does |
698 | not have enough output space to complete, then the parameter change will | 698 | not have enough output space to complete, then the parameter change will not |
699 | take effect at an undetermined location in the uncompressed data provided so | 699 | take effect. In this case, deflateParams() can be called again with the |
700 | far. In order to assure a change in the parameters at a specific location | 700 | same parameters and more output space to try again. |
701 | in the uncompressed data, the deflate stream should first be flushed with | 701 | |
702 | Z_BLOCK or another flush parameter, and deflate() called until | 702 | In order to assure a change in the parameters on the first try, the |
703 | strm.avail_out is not zero, before the call of deflateParams(). Then no | 703 | deflate stream should be flushed using deflate() with Z_BLOCK or other flush |
704 | more input data should be provided before the deflateParams() call. If this | 704 | request until strm.avail_out is not zero, before calling deflateParams(). |
705 | is done, the old level and strategy will be applied to the data compressed | 705 | Then no more input data should be provided before the deflateParams() call. |
706 | before deflateParams(), and the new level and strategy will be applied to | 706 | If this is done, the old level and strategy will be applied to the data |
707 | the the data compressed after deflateParams(). | 707 | compressed before deflateParams(), and the new level and strategy will be |
708 | 708 | applied to the the data compressed after deflateParams(). | |
709 | deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source stream | 709 | |
710 | deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream | ||
710 | state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if | 711 | state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if |
711 | there was not enough output space to complete the compression before the | 712 | there was not enough output space to complete the compression of the |
712 | parameters were changed. Note that in the case of a Z_BUF_ERROR, the | 713 | available input data before a change in the strategy or approach. Note that |
713 | parameters are changed nevertheless, and will take effect at an undetermined | 714 | in the case of a Z_BUF_ERROR, the parameters are not changed. A return |
714 | location in the previously supplied uncompressed data. Compression may | 715 | value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be |
715 | proceed after a Z_BUF_ERROR. | 716 | retried with more output space. |
716 | */ | 717 | */ |
717 | 718 | ||
718 | ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, | 719 | ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, |