#1
|
||||
|
||||
LZMA1 encoder/decoder (ASM+C)
Ask no questions:
This is the core LZMA depacker and compressor code from the private build of my EXE/DLL packer. Figured it might be useful to some people. Decided not to use LZMA2 since that seems to be just focused on format changes and not actual algorithm changes. The depacker code is modified from the original to save size and the main compression function focuses on compression ratio. Example (using lzma.cpp to pack and LzmaDecodeSize.c to depack): Prototype of decoder is: Code:
extern "C" { void LzmaDecode(UInt16* workmem, const unsigned char *inStream, SizeT inSize, unsigned char *outStream, SizeT outSize); } Code:
DWORD compressed; DWORD original_sz; BYTE *Original = Load_Input_File("unpacker.bin", &original_sz); BYTE* compressed_data = compress_lzma(Original, original_sz, &compressed); PVOID testmem = (unsigned char*)malloc(original_sz); unsigned char* workmem = (unsigned char*)malloc(0xC4000); LzmaDecode((UInt16*)workmem, compressed_data + LZMA_PROPS_SIZE, (SizeT)compressed - LZMA_PROPS_SIZE, (unsigned char*)testmem, (SizeT)original_sz); free(Original); free(compressed_data); free(workmem); free(testmem); Last edited by mudlord; 12-10-2015 at 14:34. |
The Following 3 Users Gave Reputation+1 to mudlord For This Useful Post: | ||
#2
|
||||
|
||||
For some reason i cannot download the attachment. maybe some admin could help ?!
Br |
The Following User Says Thank You to .:hack3r2k:. For This Useful Post: | ||
Indigo (07-19-2019) |
#3
|
|||
|
|||
Quote:
Answer: Search or Read the %^%&*$^ rules: http://forum.exetools.com/showthread.php?t=16581 |
The Following User Gave Reputation+1 to CryptXor For This Useful Post: | ||
mr.exodia (04-22-2016) |
The Following 9 Users Say Thank You to CryptXor For This Useful Post: | ||
aldente (04-21-2016), an0rma1 (04-26-2016), b30wulf (11-06-2018), chessgod101 (05-05-2016), Indigo (07-19-2019), LuckyPatcher (01-15-2019), uranus64 (04-21-2016), zeffy (12-31-2017), ZeNiX (04-27-2016) |
#4
|
|||
|
|||
Quote:
|
The Following User Says Thank You to virus For This Useful Post: | ||
Indigo (07-19-2019) |
#5
|
||||
|
||||
http://mudlord.info/crap/lzma_decenc.rar
|
#6
|
|||
|
|||
Hi, the links above are not working anymore. Any chance to share it again on alternative URLs ?
|
The Following User Says Thank You to Elesty For This Useful Post: | ||
Indigo (07-19-2019) |
#7
|
|||
|
|||
Quote:
or better https://github.com/mudlord/compression_testbed |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
XED2 (x86 encoder decoder) c++ library | ferrit.rce | General Discussion | 7 | 01-05-2014 07:19 |