Forum > Packages and Libraries

PV_Unpacker for ZIP, RAR, TAR

(1/2) > >>

domasz:
Here's my little library to unpack various files in pure Pascal.

Supported:
- ZIP (store & deflate)
- TAR
- RAR (store)
- RAR 5(store)

Does not support encryption.

It's a really simple library right now. You won't create a competitor to WinZIP or WinRAR with it but you can use it to:
- unpack TAR files (should unpack all TAR files)
- unpack most popular ZIP files and files based on ZIP (ODT, DOCX, JAR)

It can work fully on streams - can read archive from a stream and can extract all files to streams.

All input is welcome. If you find it has any value I will add more formats, subformats and features.

Usage example:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses PV_Unpacker; var i: Integer;begin  if not OpenDialog1.Execute then Exit;   Unp := TUnpacker.Create(OpenDialog1.Filename); //or open from TStream   if Unp.GetFormat = '' then ShowMessage('Unsupported'); //or:  if Unp.Count < 0 then ShowMessage('Unsupported');   for i:=0 to Unp.Count-1 do begin    Memo1.Lines.Add( Unp.GetName(i) );  end;   if Unp.CanUnpack(0) then Unp.Extract(0, 'output.jpg'); //or extract to TStream   Unp.Free; 

domasz:
Update- now supported:

- ZIP (store, deflate)
- RAR (store)
- LZH (store)
- TAR
- WAD (PWAD, IWAD, WAD2)
- BH
- PAK

domasz:
More formats added. Now on Github:
https://github.com/PascalVault/Lazarus_Unpacker

domasz:
And now you pack files to ZIP, TAR and more:
https://github.com/PascalVault/Lazarus_Packer

Gustavo 'Gus' Carreno:
Hey Domasz,

Thank you very much for this effort, it's quite nice and very useful !!

Just have a very dumb question due to some very fiery curiosity: Why separate the Pack and Unpack into different repos?

Cheers,
Gus

Navigation

[0] Message Index

[#] Next page

Go to full version