M
M
Mercury132018-04-13 00:33:40
C++ / C#
Mercury13, 2018-04-13 00:33:40

Is there a Zip library with streaming?

You need a ZIP library with these features.
• No file modification required. Only creation from scratch, reading and adding.
• No need for encryption.
• Reading and writing by streaming principle is needed (possible without seek). That is, in order for the library to start compressing, we do not need a file that is fully prepared in memory. We just write to a compressed file with functions like fwrite - and it automatically buffers and compresses.
So far I've tried libzip and it's not there. In addition, due to unusual optimizations, one of the libzip functions (adding a file consisting of several buffers to an archive) is difficult to wrap in C++.
For what? - Direct recording of huge XLSX. Decompressed XML can take hundreds of megabytes.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mercury13, 2021-01-09
@Mercury13

Eventually switched to a custom MiniZip port.

A
Armenian Radio, 2018-04-13
@gbg

The compression itself is done by zlib, it's streaming.
It remains only to form the structure of the ZIP file, it is quite possible to do it on the fly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question