Feature #1689

Updated by Zbigniew Rebacz about 7 years ago

patch:
ide/Core/Core.h, line 509 : add ENC_LZ4 to the enum:
<pre><code class="cpp>


@
enum {
ENC_PLAIN,
ENC_ZIP,
ENC_BZ2,
ENC_LZ4,
};
</code></pre>
};@

ide/Core/BinObj.cpp, Line 37, Add this block "else if":
@
else if(binscript.Id("LZ4"))
blk.encoding = Block::ENC_LZ4;
@

ide/Core/Core.cpp
add this "case" at lines 466 & 506:
@
case BinObjInfo::Block::ENC_LZ4: data = LZ4Compress(data); break;
@
And at line 2 :
@
#include <plugin/lz4/lz4.h>
@

finally, in order to simplify decompression, add this util overload in:
plugin/lz4/lz4:

String LZ4Decompress(Stream& in, Gate<int64, int64> progress)
{
StringStream out;
LZ4Decompress(out, in, progress);
return out;
}

Back