S
S
shasoft2020-02-26 08:35:02
Data archiving
shasoft, 2020-02-26 08:35:02

How to do streaming packaging on LZMA (7zip SDK)?

Packing data like this

CArhiv oArhiv;
oArhiv.open("file.arc")
oArhiv.write("123",3); // 1-ая порция данных
oArhiv.write("12345",5); // 2-ая порция данных
oArhiv.write("12",2); // 3-ая порция данных
oArhiv.close("");

I'm using 7zip SDK , but I can't figure out how to do stream packing with LZMA. the example 7zip\C\Util\Lzma\LzmaUtil.c uses the function
LzmaEnc_Encode(enc, outStream, inStream, NULL, &g_Alloc, &g_Alloc)
which packs a stream into a stream. I do not quite understand how to add data to the output stream in portions?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question