Open MichaelBrunn3r opened 1 year ago
It seems that all compressed_size
and uncompressed_size
are both 0 when parsing local file headers in .jar
files.
piz
compares the local header with the metadata it received from the central directory entry. That seems to create the error.
Disabling the feature check-local-metadata
fixes this problem, as the check is never made.
E.g. piz = { version = "0.5.1", default-features = false }
However as_tree
does not seem to work even with this fix. I get this error:
Hierarchy("META-INF found before parent directories")
It seems META-INF
was the first component and the tree did not contain a root node yet.
I'm trying to use this library to read images in parallel from a .jar file.
Listing files works great, but reading them or building a tree with
as_tree
does not work. To my knowledge .jar files are just .zip files, just like WordDocuments and ExcelSheets. I was able to open the .jar file using thezip
crate.Reading a file results in the error:
InvalidArchive("Central directory entry doesn't match local file header")