Add NoCompression option to tarball compressor#120
Add NoCompression option to tarball compressor#120aramprice merged 2 commits intocloudfoundry:developfrom
Conversation
- Add NoCompression field to CompressorOptions struct - Update tarballCompressor to conditionally include -z flag based on NoCompression option - Add comprehensive unit tests for NoCompression functionality - Update fake compressor to support new option - Tests verify both CompressFilesInDir and CompressSpecificFilesInDir methods - Tests check for presence/absence of -z flag instead of exact argument matching
b4fcbc9 to
ffb6efc
Compare
KauzClay
left a comment
There was a problem hiding this comment.
I don't have approval powers, but it makes sense to me. Seems to match how CompressorOptions is used in other places in this repo.
Will you then need to pull this into https://github.com/cloudfoundry/bosh-cli/tree/main ?
Yes, that's the plan. I have already prepared the changes in bosh-cli locally. Waiting for this to get merged so that I can open a PR in bosh-cli |
|
Quite odd... I cannot change the base branch of this PR to get past the Will investigate this tomorrow. |
|
@rkoster Would you please re-trigger the check-branch job and merge this? |
Omitting the -z flag during extraction (-x) is considered best practice as it works for both compressed and non-compressed tars.
791f4db to
45b9c17
Compare
This PR adds a new NoCompression option to the tarball compressor that allows creating uncompressed tar files instead of gzipped ones.
Changes
Testing
Usage
Motivation
This feature is useful when you need to create uncompressed tar files, for example when working with already compressed content or when you want to avoid the overhead of compression for small files.