Ward Posted March 28, 2010 Share Posted March 28, 2010 How to compress data in memory? The simplest way is to use the Native API Compression by trancexx. Here provides another way, using LZMA algorithm. LZMA is the default method of 7z format, provides a high compression ratio and very fast decompression.In this UDF, embedded and external DLL are both supported. If "LZMA.DLL.AU3" (embedded binary) is not included in scripts, a external LZMA.DLL must exists. You can use external DLL if MemoryDll is not work for you.Some tips:Both LzmaEnc and LzmaDec only accept binary arguments. To compress string, StringToBinary and BinaryToString can help.LzmaEnc can accept an extra argument, the comression level, from 1 to 9. For example: LzmaEnc($Binary, 9)More settings are support by LzmaEncSetting, please see LZMA SDK.This UDF is not for file compression. To compress files, 7-ZIP UDF is the better choiceExample:#include "LZMA.AU3" #include "LZMA.DLL.AU3" Local $Source = Binary("LZMALZMALZMALZMALZMALZMALZMALZMALZMALZMA") Local $Compressed = LzmaEnc($Source) Local $Decompressed = LzmaDec($Compressed)LZMA.zip vnvector, mLipok and n1maS 3 新版 _ArrayAdd 的白痴作者,不管是誰,去死一死好了。 Link to comment Share on other sites More sharing options...
BoonPek Posted August 8, 2011 Share Posted August 8, 2011 This looks interesting, and is vital to my script. Can anyone here please eh... revive this? Sorry for the necrobump, I'd like a function that can decompress LZMA files without the requirement of an external DLL Link to comment Share on other sites More sharing options...
Hammerfist Posted December 26, 2016 Share Posted December 26, 2016 Does anyone have a copy of this UDF? Bump please My topics:<<<< Project ECO Helper >>>><<<< _ReduceMemory GUI >>>> Link to comment Share on other sites More sharing options...
argumentum Posted December 26, 2016 Share Posted December 26, 2016 4 hours ago, Hammerfist said: Does anyone have a copy of this UDF? Bump please ok, here: LZMA.zip but remember that this is from 6 years ago and the original poster has been away for over a year. Werty 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Hammerfist Posted December 26, 2016 Share Posted December 26, 2016 Thanks, bro! Anyway I'll have a starting point to investigate this even if Udf is outdated. You have my respect =) argumentum 1 My topics:<<<< Project ECO Helper >>>><<<< _ReduceMemory GUI >>>> Link to comment Share on other sites More sharing options...
InunoTaishou Posted December 28, 2016 Share Posted December 28, 2016 Might be better to check out this Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now