Closed hce closed 8 years ago
Thank you for the report, I will look into that this weekend.
@hce, Should be fixed, please check locally if you can. There will be one more change and I'll reseale new version on Hackage.
Just tested it: it takes less than a second now. Thank you!
We cannot make it faster because we should assume that comment may be up to 0xffff
bytes long (archive ends with a comment “field” and to scan it fast we need to traverse from end backwards till we hit end of central directory signature).
Glad it works!
Using withArchive on a file that is not a valid archive can take a lot of time and CPU and before an error is thrown. It would be nice if illegal files were detected immediately.
For example, create a file using dd: dd bs=1k count=10k if=/dev/urandom of=invalid.zip
And then do: withArchive pathToInvalidZip $ return ()