Closed TranquilMarmot closed 5 years ago
Yes! I was actually planning this, my idea is for getFilesObject and getFilesArray to return CompressedFile objects ( unless you run extractFiles() ) which would have extract() method on it, what do you think about that kind of API ?
That sounds great! My use case is to basically stream in one file at a time (i.e. paging through images in a zip) so that would work awesome.
do you mind trying it out before I merge it ? https://github.com/nika-begiashvili/libarchivejs/tree/single-file-extract
Released as v1.1.0
You can call
getFilesObject
andgetFilesArray
to get a list of all of the files in an archive, but it seems like the only option to extract any files is to callextractFiles
which extracts all of the files.Would it be possible to add a way to only extract one of the files in the array?