I think maybe zipEntry.asBinary() and zipEntry.asArrayBuffer() are close to the correct answer, but I don't think them is the correct answer.
What can I use?
Thanks for answer!
You may try my Dauria package. However, it聽uses Node.js Buffer as聽a聽source; therefore, if聽your聽work resides in聽a聽web聽browser, some browser-based Buffer implementation becomes necessary (such聽as the聽implementation provided聽by Browserify).
thank you, but I want to use Jszip in modern web browser, not Node.js.
Here is a JSFiddle that converts an array buffer to a data URL and sets it as the source of an image: http://jsfiddle.net/Jan_Miksovsky/yy7Zs/
URL.createObjectURL(new Blob([zip.file('filename').asArrayBuffer()], {type : your/mime'}))
thanks @ottoville it worked nice!
.. i have to rely on extracting "extenstion" to prepare "mimeType" from filename, and its surely not a good point.
@Stuk how to get mimeType of any file included in zipped content?
I feel, in the API doc you provided, there are plenty of examples for making the zipped file, still working with unzipped contents has no useful information.
Most helpful comment
URL.createObjectURL(new Blob([zip.file('filename').asArrayBuffer()], {type : your/mime'}))