-
Notifications
You must be signed in to change notification settings - Fork 27
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
Clearer errors/warnings when using list_archive_files followed by uncompress_archive_file #117
Comments
How do you suggest we address this? |
I think a few things would be nice in order from least to most work:
Like I said I'm quite new to rust so I don't have a good sense of what's idiomatic or how much effort 3. is, but I think the nice thing is to avoid writing an uncompressed file to disk if you don't actually need that output file (for example my use case is just calculating the sha1 and crc32 of the file inside the archive). So being able to iterate over the files in the archive and uncompress conditionally at each iteration would feel intuitive. EDIT: I also think potentially on the unrecognized format error in these functions, perhaps a more informative error in such cases of detecting that the file pointer wasn't at 0 might be useful if it doesn't impact performance. Or if it doesn't impact performance, just automatically rewinding the file pointer after calling list_archive_files(). |
Would you be willing to work on those items? If so I can help. |
Potentially yes. I have a lot to learn about Rust so I'll see what I can figure out. |
I'm new to rust so forgive me if this should have been assumed from the use of a mutable reference, but it took me a long time to realize that after using list_archive-files() you must rewind the file pointer in order to use uncompress_archive_file() (and I assume other decompression functions on the same file handle).
I assume calling list_archive_files() before another decompression function would be relatively common, so some documentation, warnings, or automatic seeking/rewinding would be appreciated.
The text was updated successfully, but these errors were encountered: