Opened 11 years ago
#5619 new Feature Requests
zlib: Add support for additional flush mode
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
The zlib filter uses Z_SYNC_FLUSH which is the most widely used flush mode. However SSH requires Z_PARTIAL_FLUSH. For further information please see the "Partial Flush" paragraph at: www.bolet.org/~pornin/deflate-flush.html
It would be trivial to add the new flush mode:
File: zlib.hpp
Add
BOOST_IOSTREAMS_DECL extern const int partial_flush;
Add additional argument to zlib_params:
zlib_params(
int flush_mode = zlib::default_flush_mode
add int flush_mode_ member to zlib_base
init flush_mode_ member in zlib_base::do_init
flush_mode_ = p.flush_mode;
and in the filter function change the xinflate to:
int result = xinflate(flush_mode_);
File: zlib.cpp
const int partial_flush = Z_PARTIAL_FLUSH;
const int default_flush_mode = sync_flush;
Please let me know if there is an interest for the diff files.