Subject: [Boost-bugs] [Boost C++ Libraries] #5619: zlib: Add support for additional flush mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-06-18 07:15:12
#5619: zlib: Add support for additional flush mode
-------------------------------------+--------------------------------------
Reporter: mb@⦠| Owner: turkanis
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: iostreams
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
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:[[BR]]
'''File: zlib.hpp'''[[BR]]
Add [[BR]]
BOOST_IOSTREAMS_DECL extern const int partial_flush;[[BR]]
Add additional argument to zlib_params:[[BR]]
zlib_params( [[BR]]
int flush_mode = zlib::default_flush_mode[[BR]]
add int flush_mode_ member to zlib_base[[BR]]
init flush_mode_ member in zlib_base::do_init[[BR]]
flush_mode_ = p.flush_mode;[[BR]]
and in the filter function change the xinflate to:[[BR]]
int result = xinflate(flush_mode_);[[BR]]
'''File: zlib.cpp'''[[BR]]
const int partial_flush = Z_PARTIAL_FLUSH;[[BR]]
const int default_flush_mode = sync_flush;[[BR]]
[[BR]]
Please let me know if there is an interest for the diff files.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5619> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC