<div dir="ltr">You can indeed do that way, but the code to do that would look very different from the current code, because you need to apply relocations and pass it to zlib for each input section. Not sure if it's worth it.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 11, 2017 at 9:59 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class=""><div dir="ltr">On Tue, Apr 11, 2017 at 9:47 AM Rui Ueyama via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added a comment.<br class="m_-8069685880638433080gmail_msg">
<br class="m_-8069685880638433080gmail_msg">
I wonder why you want a streaming compression support to write compressed .debug sections. All you need is to call zlib's `compress2` only once for each section, no?<br class="m_-8069685880638433080gmail_msg"></blockquote></span><div><br>Potentially to avoid having to manifest the entire output section in a single buffer in memory first (eg: if you're compressing 3 chunks from input objects together into the final output section - you can avoid the intermediate buffer/copying/etc, by passing the chunk from each input object in to a streaming compression device). At least that's what I'd use this for in llvm-dwp.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="m_-8069685880638433080gmail_msg">
<br class="m_-8069685880638433080gmail_msg">
<a href="https://reviews.llvm.org/D31943" rel="noreferrer" class="m_-8069685880638433080gmail_msg" target="_blank">https://reviews.llvm.org/<wbr>D31943</a><br class="m_-8069685880638433080gmail_msg">
<br class="m_-8069685880638433080gmail_msg">
<br class="m_-8069685880638433080gmail_msg">
<br class="m_-8069685880638433080gmail_msg">
</blockquote></div></div>
</blockquote></div><br></div>