Feature #1689

Add LZ4 compression to brc file

Added by Abdelghani Omari over 3 years ago. Updated over 3 years ago.

Status:ApprovedStart date:04/22/2017
Priority:LowDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:IDESpent time:-
Target version:-

Description

patch:
ide/Core/Core.h, line 509 : add ENC_LZ4 to the enum:

        enum {
            ENC_PLAIN,
            ENC_ZIP,
            ENC_BZ2,
            ENC_LZ4,
        };

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;
}

History

#1 Updated by Abdelghani Omari over 3 years ago

  • Status changed from New to Patch ready

#2 Updated by Zbigniew Rebacz over 3 years ago

  • Description updated (diff)

For complex patches i highly recommended diff format instead of plain text version. I wrote to you on slack - how to generated diff compatible with upp svn.

Moreover, you could add pre tag to indicates code in this message (I edited the first code block, so you could see how to do this for other - just edit the description).

#3 Updated by Zbigniew Rebacz over 3 years ago

  • Description updated (diff)

#4 Updated by Abdelghani Omari over 3 years ago

  • Description updated (diff)

#5 Updated by Miroslav Fidler over 3 years ago

Being there, also LZMA and Zstd...

#6 Updated by Miroslav Fidler over 3 years ago

  • Status changed from Patch ready to Approved

Also available in: Atom PDF