-
Notifications
You must be signed in to change notification settings - Fork 56
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
Decouple ztoc creation and compression algorithm #346
Merged
Merged
Conversation
This file contains 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
djdongjin
force-pushed
the
refactor-ztoc-create
branch
6 times, most recently
from
January 25, 2023 02:59
126a5de
to
f10b4ce
Compare
djdongjin
changed the title
[WIP] Decouple ztoc creation and compression algorithm
Decouple ztoc creation and compression algorithm
Jan 25, 2023
hanyuel
reviewed
Jan 26, 2023
hanyuel
reviewed
Jan 26, 2023
hanyuel
reviewed
Jan 26, 2023
rdpsin
reviewed
Jan 27, 2023
djdongjin
force-pushed
the
refactor-ztoc-create
branch
4 times, most recently
from
January 27, 2023 19:19
c81dd55
to
62e5d5b
Compare
Kern--
reviewed
Jan 28, 2023
djdongjin
force-pushed
the
refactor-ztoc-create
branch
5 times, most recently
from
January 30, 2023 21:08
9cb84f8
to
a15cfe7
Compare
djdongjin
force-pushed
the
refactor-ztoc-create
branch
5 times, most recently
from
February 6, 2023 20:33
75b8202
to
fbad924
Compare
Signed-off-by: Jin Dong <jindon@amazon.com>
djdongjin
force-pushed
the
refactor-ztoc-create
branch
from
February 6, 2023 22:47
fbad924
to
92afcc6
Compare
Kern--
reviewed
Feb 8, 2023
Kern--
approved these changes
Feb 8, 2023
rdpsin
approved these changes
Feb 8, 2023
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.
Signed-off-by: Jin Dong jindon@amazon.com
Issue #, if available: Fix #233
Description of changes:
Decouple ztoc creation and compression by adding a
ztoc.Builder
which has:ztoc.TocBuilder
that buildsTOC
and works with both gzip and zstd.ztoc.ZinfoBuilder
per compression algorithm (currently, onlygzip
).ztoc.Builder
has one export funcBuildZtoc
which checks compression algorithm and buildsZtoc
(TOC
viaTocBuilder
,Zinfo
viaZinfoBuilder
).ztoc.TocBuilder
has one export funcTocFromFile
which createsTOC
given compress algorithm and tar filename. It supports different compression by creating different tar readers through compression libraries (e.g.,gzip.NewReader
,zstd.NewReader
).ztoc.ZinfoBuilder
interface has one export funcZinfoFromFile
which createsZinfo
given compress tar filename and span size. Currently it has one implementation forgzip
(gzipZinfoBuilder
).Testing performed:
make test && make integration
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.