Extracts one or all files from an archive streamm to the specified folder.
The following archive formats are supported: Zip, ZipX, EPub, 7z, BZip2, Cab, Rar, Tar, ISO, CHM and LZH.
Specify -1 to extract all files, or specify an index of a specific file. The file(s) will be output to the specified folder.
If UseFullPath = False, then all files will be output to the specified folder. If UseFullPath = true, then the folder structure of the zip will be created within the specified path.
If the file is encrypted you can specify the password (otherwise a password prompt will be displayed if AutoPromptForPassword is enabled).
The result will be false if an error is encountered, e.g. the file in the stream is not a supported format or the 7z plug-in is not found (Aborting will be true).
Note: ◼Archive extraction requires the 7z plug-in ◼ExtractFromStreamZIP does not reset the position of the stream, so you may need to first call Stream.Position := 0; ◼To abort while extracting set Aborting to true ◼Read more about ImageEn ZIP Support
// Extract all files from a zip file to D:\Out\ (Recreating the internal zip folder structure) ImageEnView1.IO.ExtractFromStreamZIP( Stream, -1, 'D:\Out\', True );
// Extract the first file from a zip file to D:\Out\ ImageEnView1.IO.ExtractFromStreamZIP( Stream, 0, 'D:\Out\', False );
// Extract three files from a zip images[0] := 2; images[1] := 4; images[2] := 5; ImageEnView1.IO.ExtractFromStreamZIP( Stream, images, 3, 'D:\Out\', False );