Concatenate multiple zlib compressed data streams into a single stream efficiently

前端 未结 3 378
孤城傲影
孤城傲影 2020-12-20 18:59

If I have several binary strings with compressed zlib data, is there a way to efficiently combine them into a single compressed string without decompressing everyth

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-20 19:33

    Since you don't mind venturing into C, you can start by looking at the code for gzjoin.

    Note, the gzjoin code has to decompress to find the parts that have to change when merged, but it doesn't have to recompress. That's not too bad because decompression is typically faster than compression.

提交回复
热议问题