我使用jedi的jcl TJclDecompressArchiveClass和TJclDecompressArchive
// http://wiki.delphi-jedi.org/index.php?title=JEDI_Code_Library
var
archiveclass: TJclDecompressArchiveClass;
archive: TJclDecompressArchive;
item: TJclCompressionItem;
implementation
uses JclCompression;
archiveclass := GetArchiveFormats.FindDecompressFormat('c:\1.7z'));
archive := archiveclass.Create('c:\1.7z');
archive.ListFiles;
archive.OnProgress := Form1.ArchiveProgress;
for i := 0 to archive.ItemCount - 1 do
begin
item := archive.Items[i];
try
case item.Kind of
ikFile:
begin
item.Selected:=True;
archive.ExtractSelected('e:\temp');
// how to get the archive.item[i].Selected.stream ?
end;
end;
finally
end;