-
First of all, thank you for this utility! I've been using it for a form that reads a zip file in-browser and generates blobs for each zipped file, which are then converted to Uint8arrays for hashing. I was wondering if it was possible to retrieve 'lastModified' timestamps from files inside zips? Or other properties normally retrieved from file uploads ('type' might be useful as well). When I look at the results of the fflate.unzip method I can only see buffer, bytelength, byteoffset, length and symbol. I accept I'm probably misunderstanding something on a fundamental level but any light would be appreciated. Many thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I did not implement support for reading metadata from zip archives because they are not consistently encoded across different platforms and are not typically used by most consumer software. That is unlikely to change for bundle size reasons. If you're creating the ZIP files yourself, I'd make a "fake" directory (sort of like Archive Utility's If you absolutely need to read this metadata from ZIP files you aren't creating, I'd try something like |
Beta Was this translation helpful? Give feedback.
I did not implement support for reading metadata from zip archives because they are not consistently encoded across different platforms and are not typically used by most consumer software. That is unlikely to change for bundle size reasons.
If you're creating the ZIP files yourself, I'd make a "fake" directory (sort of like Archive Utility's
__MACOSX
) where each file inside contains some metadata you want to include (maybe some JSON like{ "type": "application/octet-stream", "lastModified": 1707581482254 }
, and then read those fake entries when you decompress.If you absolutely need to read this metadata from ZIP files you aren't creating, I'd try something like
zip.js
instead, which has…