[PATCH] D31943: [Support] - Implemented zlib::StreamCompression class.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 10:07:26 PDT 2017


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.

On Tue, Apr 11, 2017 at 9:59 AM, David Blaikie <dblaikie at gmail.com> wrote:

>
>
> On Tue, Apr 11, 2017 at 9:47 AM Rui Ueyama via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> ruiu added a comment.
>>
>> 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?
>>
>
> 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.
>
>
>>
>>
>> https://reviews.llvm.org/D31943
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170411/ee24ec63/attachment.html>


More information about the llvm-commits mailing list