Jump to content

Recommended Posts

Posted (edited)

Hi guys,

I often need zipping\unzipping function within my scripts, so I've decided to do a systematic research about it to understand which options I had. I'm sharing with you these results because I think it can save some time to somobody :)

Autoit coders produced much material from 2005 till now, most of it consists of UDF wrappers of 3rd parts libraries, but there are some exception.

Let's start:

  • ZIP from scratch UDF: written by joakim. You can retrieve some info from a zip file, but it is just a PoC script, as I can see.
  • LZ UDF: written by trancexx: another exception. It use native windows compression, so it doesn't need anything. It can work with memory, it doesn't work with files.
  • LZMA UDF: written by Ward. He writes a dll which can be directly included or can be embedded within an au3 file. It can work with memory, it doesn't work with files. [it needs LZMA.dll or LZMA.dll.au3](link missing)
  • Package UDF: written by Yashied. It is useful for dealing with package (.pkr) file.
  • ZIP UDF: written by Wraithdu (yet torels UDF): the exception! Based on zipfldr.dll, a native library of Windows, so it does not need to include an external library into the script. It is its strenght, but its weak point too: if zipfldr.dll is corrupted or is missing, your script will not do what you expect.
  • gZip UDF: written by Zinthose. Based on the parsing of gZip.exe output. It can work with memory, it doesn't work with files. [it needs gZip.exe]
  • ZLib UDF: written by monoceres. Based on ZLib.dll. It can compress\uncompress data in memory, it doesn't work with files. [it needs ZLib.dll]
  • pZip UDF: written by asdf8. Based on ZLib.dll. It can extract\add\overwrite file into archives. [it needs pZip.dll]
  • ZLib and gZip UDF: written by Ward. Based on ZLib.dll but it does not need the dll file, because it is written directly in the UDF! It can compress\uncompress data in memory, and it can work with files. It works with gZip format too. (link missing)
  • XZip UDF: written by eltorro, KXM and erifash. Based on XZip.dll, a COM dll. [it needs XZip.dll]
  • XZip UDF: written by mLipok. Based on XZip.dll, a COM dll. A more complete alternative to previous UDF. [it needs XZip.dll]
  • unRAR UDF: written by rasim. Based on unRAR.dll. You can just uncompress rar files with this one (the only method for new v5 RAR files). [it needs unRAR.dll]
  • Parsing unRAR.exe output: you can just uncompress rar files in this way (the only method for new v5 RAR files). [it needs unRAR.exe]
  • 7Zip: I spent a lot of time with it, because I think it is the most useful, there are different approaches:
  1. Parsing 7za.exe output, it is the simplest (and in my opinion the best) way, some UDFs can help with it, as jennico UDF (thanks to Screen Scrape script by Valik, it seems it doesn't work in Windows 10) [it needs 7za.exe]
  2. Using 3rd part dll, as rasim UDF (yet jak UDF). He rewrites a dll which can be simply invoked by his UDF [it needs 7-zip32.dll and\or 7-zip64.dll]. With Decipher UDF you doesn't need to include the dll in your project, because it is compiled into the script and loaded in memory directly at runtime.
  3. Invoking 7za.dll. This is the most complicated approach because the library doesn't use standard COM interfaces. Anyway dany, Starg, milky, trancexx, Mugen and finally Biatu had spent some time with it and they reach a sort of partial result. [it needs 7za.dll]

 

Comment here to add suggestions\links\UDF I forgot and I'll update this post with them!

Edited by j0kky
Posted (edited)

I looked at the options sometime ago but i went the path of using unrar.exe which is the extract only version of winrar.

It is commandline and has switches and can be easily used to extract files including the modern winrar 5 which 7z fails on

Note i did say extract only..

Edited by Chimaera
Posted (edited)

The wiki holds a list of UDFs including a lot for data compression.
I will check which of your list is missing and add it to the list.

Edited by water

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Done

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Thanks guys!

@water: if you want, you can add at the end of "data compression" wiki section a link to this conversation, in this way users could have an overview of the options and could read a detailed description about each UDF

Posted

@j0kky - I believe there was another ZIP program here, similar to the first you mention. It either preceded that one or came after. I believe they were linked together, but as many old links were broken by Forum upgrade(s), it may no longer work. I am still using the earlier one in some of my programs, but like many here, I just tend to use 7Zip these days, especially if I want more control.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

  Reveal hidden contents

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Posted

@TheSaint: Are you talking about Zip Plugin by eltorro? I didn't include it in the list because its link is broken due to forum upgrade, and the copy I discovered on the web used old Autoit function as PluginOpen, so it needs to be partially rewritten

Posted

 

 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 2/14/2016 at 1:34 PM, j0kky said:

@TheSaint: Are you talking about Zip Plugin by eltorro? I didn't include it in the list because its link is broken due to forum upgrade, and the copy I discovered on the web used old Autoit function as PluginOpen, so it needs to be partially rewritten

Expand  

I suspect that was the one. I probably did some work-a-rounds for it myself or I amended something someone else did, as I'm pretty sure I didn't use PluginOpen, just normal DLL calls.

You can always try The Way Back Machine to retrieve links.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

  Reveal hidden contents

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Posted

The Way Back Machine means you are browsing a no longer existing version of the forum, so links work etc. Those links can be extracted and edited if necessary to point to locations that still exist, though older forum stuff has now been archived.

Google only searches the here and now.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

  Reveal hidden contents

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Posted (edited)

I have never used it, in fact I was thinking you were just kidding :D anyway, if I have not done some errors, the archive saves only 4 Autoit forum attachments :( 

Edited by j0kky
Posted

It can be tricky to use, and time consuming as you traverse the timeline in search of things. It is amazing what can be found sometimes, especially downloads.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

  Reveal hidden contents

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Posted

@j0kky: as your list appears to include non-zip compression algorithms, you may wish to add trancexx's PNG-based compression method too.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...