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

Refactor IO Directory Processing and Compression Logic #63

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

Daniil-Golikov
Copy link
Contributor

  • First, the directory processing has been completely redone to replace the outdated and unmaintainable code used for old directory processing. Now, it simply invokes process_single_file.

  • Second, the logic has been changed so that it no longer creates a new folder named "foldername-(de-)compressed". Instead, (de-)compressed files are now placed in the same folder.

  • Third, I've reverted to the previous logic; if a file is unsupported (for example, raw), the code shouldn't stop. Instead, the file should be skipped.

Note: All the changes were discussed in meeting with Carlos.

P.S. The integration tests are really great. I've modified the directory tests due to the change in logic.

P.S. As discussed with Carlos, if the changes are deemed not beneficial enough and/or if the trade-offs(such as returning Options instead of just results from the readers) are deemed significant enough, I'll close this PR and eliminate all the directory processing

@Daniil-Golikov Daniil-Golikov requested a review from cjrolo October 30, 2023 10:47
brro-compressor/src/main.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@rukai rukai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I'll defer to carlos on the design of the directory handling functionality, but code wise nice cleanup!

Copy link
Collaborator

@cjrolo cjrolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good cleanup, let's give this a try!

@cjrolo cjrolo merged commit f93ab82 into main Oct 31, 2023
@cjrolo cjrolo deleted the io-directory-fix branch October 31, 2023 08:35
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

Successfully merging this pull request may close these issues.

3 participants