tar: add explicit zstd compression support#154
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
==========================================
+ Coverage 96.78% 96.89% +0.10%
==========================================
Files 9 11 +2
Lines 1121 1481 +360
Branches 28 29 +1
==========================================
+ Hits 1085 1435 +350
- Misses 35 45 +10
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi! I'm in the middle of implementing "-f -", and this patch as it's structured will make that work difficult. If you don't mind, I'd like to hold this patch until that lands and I'll rework it. (I also have #149 that centralises the error handling) |
|
no problem - can you ping me when that's complete? |
|
Will do! I'm blocked on review of mine, and then I can review yours =) |
13bbb47 to
2b4877b
Compare
2b4877b to
5003453
Compare
|
Hello! I think this is ready for another look |
|
Thanks for updating . the commit I wanted to get in is now in, I'm planning to review your two compression PRs in the next few days. |
|
(wrong button, sorry!) |
kaladron
left a comment
There was a problem hiding this comment.
I'm sorry about the delay in doing this review!
Can you please make sure that the benchmark code in benches/bench_tar.rs is updated for the changed signatures?
Otherwise this looks good to me.
| /// - Any input file cannot be read | ||
| /// - Files cannot be added due to I/O or permission errors | ||
| pub fn create_archive( | ||
| pub(crate) fn create_archive( |
There was a problem hiding this comment.
Why are you changing the visibility? This would break the benchmark stuff that imports this for testing.
Add an explicit --zstd flag for create, list, and extract so .tar.zst archives work end to end. Keep the scope narrow by requiring the flag instead of trying to autodetect compression. Add CLI coverage and end-to-end tests for creating, listing, and extracting zstd-compressed archives.
Pass CompressionMode::None from the existing tar benchmarks after the archive operation helpers gained explicit compression arguments. Keep the operation helpers and CompressionMode public so the external benchmark target can continue importing them through the uu_tar library.
Add an explicit --zstd flag for create, list, and extract so .tar.zst archives work end to end.
Keep the scope narrow by requiring the flag instead of trying to autodetect compression. Add CLI coverage and end-to-end tests for creating, listing, and extracting zstd-compressed archives.