compression: introduce compression.Type interface#3136
Merged
Conversation
67812dc to
4965e48
Compare
73f82dd to
3c82a8b
Compare
Contributor
Author
AkihiroSuda
reviewed
Oct 13, 2022
ktock
reviewed
Oct 13, 2022
8961a30 to
9ce0c53
Compare
Contributor
Author
|
@AkihiroSuda @ktock Ping~ Please help to keep looking. |
9ce0c53 to
c1e0397
Compare
AkihiroSuda
approved these changes
Oct 18, 2022
|
Thanks a lot for the review! @AkihiroSuda |
ktock
reviewed
Oct 19, 2022
Introduce a new compression.Type interface, which needs to be implemented for each compression type, by that we can reduce the number of switch case statements and ensure that we don't miss the handle of any compression types, and also make more easily for supporting new compression types. This is a commit for code improvement, so no logical changes. Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
Make the field `compression` private in case it is initialized with nil compression.Type. Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
c1e0397 to
1cfbf10
Compare
jedevc
approved these changes
Oct 19, 2022
ktock
approved these changes
Oct 19, 2022
|
Could someone help merge this commit so we could proceed the main PR? Thanks a lot! |
Contributor
Author
|
@tonistiigi Ping~, please help to take a final look, thanks! |
Contributor
Author
|
Thanks for all! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a new
compression.Typeinterface, which needsto be implemented for each compression type, by that we can
reduce the number of switch case statements and ensure that
we don't miss the handle of any compression types, and also
make more easily for supporting new compression types.
This is a commit for code improvement, so no logical changes.
A successful test can be found here.