Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: not tolerating archives with bad/missing meta data, but which are extractable #36

Open
rwperrott opened this issue Jul 19, 2024 · 4 comments

Comments

@rwperrott
Copy link

In Linux common desktop archive tools can open these defective archives, e.g. XArchiver. It can be stupid stuff like a missing end-of-file directory in zip (cbz) files, or a missing end of file marker.
It's annoying having to handle these file by extracting, then recompressing, so that the can be reprocessed.
I suspect that switching to 7z libraries for archives could fix this.

@rwperrott
Copy link
Author

I think that this issue is significantly caused by not recognising input filesystem files over 2GB in size, or Zip64. I have seen comic cbz of several volume directories, which exceeded 2GB in size.

@rwperrott
Copy link
Author

As a workaround I've been using 7zz and this article: https://www.baeldung.com/linux/batch-convert-image-formats

@rwperrott
Copy link
Author

I suspect that the cause of these bugs was int32-only archive-size support in the dependency gen2brain/go-unarr https://pkg.go.dev/github.com/gen2brain/go-unarr, so it can't handled int64 sized archive files, even for non-zip archives! cbconvert still failed when I re-archiving over 2GB.zip/cbz files as .7z and .tar files, and tried to convert the contained png's to a zip of webp's.

@gen2brain
Copy link
Owner

The relevant issue is this I think selmf/unarr#15. There are no plans to add support for different archive libraries because they don't exist. I was thinking about adding support for libarchive but I would have to create new bindings, probably with purego (i.e. dlopen) and then maybe fall back to unarr. I don't have the time for that currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants