Skip to content

move compression to a separate package #7

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

thaJeztah
Copy link
Member

No description provided.

@thaJeztah thaJeztah force-pushed the move_compression branch 3 times, most recently from c77f9a7 to 101e3d1 Compare April 15, 2025 07:23
Signed-off-by: Sebastiaan van Stijn <[email protected]>
"Uncompressed" is 0, and the default value.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
type Compression int

const (
Uncompressed Compression = 0 // Uncompressed represents the uncompressed.
Copy link
Member Author

Choose a reason for hiding this comment

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

This could be None instead of Uncompressed as suggested in moby/moby#49167 (comment)

I kept it to align with containerd, but TBD I guess?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not really a blocker for me, but I would be much more in favor of None (compression.None instead of compression.Uncompressed) 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

OK; done!

I also swapped the order of commits, doing the test-table changes first (before the move)

type Compression int

const (
Uncompressed Compression = 0 // Uncompressed represents the uncompressed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really a blocker for me, but I would be much more in favor of None (compression.None instead of compression.Uncompressed) 😅

Signed-off-by: Sebastiaan van Stijn <[email protected]>
TODO: align with containerd pkg/archive/compression, which

- also moved the utilities to Compress/Decompress streams
- changed the Extension to not include ".tar"

Signed-off-by: Sebastiaan van Stijn <[email protected]>
It's only used in tests now, so move it there.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah requested a review from vvoland April 16, 2025 09:03
@thaJeztah
Copy link
Member Author

@vvoland PTAL - looks like branch protection on this repo requires "re-approval"

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.

2 participants