Boost C++ Libraries: Ticket #7810: zlib_error::check throws on Z_BUF_ERROR https://svn.boost.org/trac10/ticket/7810 <p> zlib_error::check has a line that checks for Z_BUF_ERROR but it is commented out. Now the documentation for zlib states that Z_BUF_ERROR is not a fatal error and so I think the commented code should actually be activated since it now happens to me that io::zlib_decompressor fails on one of my files. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7810 Trac 1.4.3 m.hekkelman@… Sat, 22 Dec 2012 18:43:39 GMT <link>https://svn.boost.org/trac10/ticket/7810#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7810#comment:1</guid> <description> <p> Although I do believe the iostreams zlib wrapper code might run into problems, further investigation of my own code that triggered this report revealed that the file I was testing was truncated... duh. My bad, should have checked that first of course. </p> <p> The problem here is the error code returned by zlib (Z_BUF_ERROR) which is a bit ambiguous. </p> <p> The way the code is written in iostreams zlib wrapper might still throw an exception in a case where this is inappropriate. Working around this would need a kind of rainy day fund approach where a temp buffer should be used to expand remaining bytes in the zlib buffer. </p> </description> <category>Ticket</category> </item> <item> <author>Ibrahim Gokhan YANIKLAR <ibrahim.yaniklar@…></author> <pubDate>Mon, 14 Sep 2015 12:30:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7810#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7810#comment:2</guid> <description> <p> This fix recovers Z_BUF_ERROR conditions successfully. </p> <p> <a class="ext-link" href="https://github.com/boostorg/iostreams/pull/17"><span class="icon">​</span>https://github.com/boostorg/iostreams/pull/17</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Edward Diener</dc:creator> <pubDate>Fri, 09 Dec 2016 01:17:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7810#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7810#comment:3</guid> <description> <p> The fix causes problems with gzip so it has been backed out. A Z_BUF_ERROR throws an exception which the end-user should be prepared to catch so as to retry the zlib compression or decompression as appropriate. </p> </description> <category>Ticket</category> </item> </channel> </rss>