brendan-duncan/archive

How To extract password Protect Zip file or Zip file and save folder from zip file inside memory (folder have images)

Opened this issue · 1 comments

How To extract password Protect Zip file or Zip file and save folder from zip file inside memory (folder have images)

extractArchiveToDisk will write a memory Archive to disk, and extractFileToDisk will write a decode a file zip to disk, with the password argument:
https://github.com/brendan-duncan/archive/blob/master/lib/src/io/extract_archive_to_disk.dart

If the zip is in memory, you can extract it from memory with Archive archive = new ZipDecoder().decodeBytes(bytes, password="...");. Then you can use that extractArchiveToDisk function to write that out to disk.
https://github.com/brendan-duncan/archive/blob/master/lib/src/zip_decoder.dart

A big caveat: I don't expect the password support to be very robust.