Skip to content
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

Support zstd compression #5

Merged
merged 4 commits into from
Dec 28, 2024
Merged

Support zstd compression #5

merged 4 commits into from
Dec 28, 2024

Conversation

ben-z
Copy link
Member

@ben-z ben-z commented Dec 28, 2024

Resolves #4

@ben-z ben-z requested a review from Copilot December 28, 2024 19:07

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • tests/integration/compression/test.sh: Language not supported
Comments suppressed due to low confidence (1)

src/docker_unpack/utils.py:197

  • Replace the debug print statement with a proper logger call.
print(f"calling taropen with {name=}, {mode=}, {zfobj=}")
@ben-z ben-z requested a review from Copilot December 28, 2024 19:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • tests/integration/compression/test.sh: Language not supported
Comments suppressed due to low confidence (2)

src/docker_unpack/utils.py:193

  • The method zstandard.open does not exist. It should be zstandard.ZstdCompressor().stream_writer for writing.
zfobj = zstandard.open(fileobj or name, mode + "b", cctx=zstandard.ZstdCompressor(write_checksum=True, threads=-1))

src/docker_unpack/cli.py:34

  • Constructing the mode using f-strings might lead to incorrect modes if input_file_proxy.getcomptype() returns an unexpected value.
with MyTarFile.open(fileobj=input_file_proxy, mode=f"r{'|' if input_file_proxy.supports_streaming() else ':'}{input_file_proxy.getcomptype()}") as tar:

src/docker_unpack/utils.py Show resolved Hide resolved
@ben-z ben-z merged commit f1ecb41 into main Dec 28, 2024
6 checks passed
@ben-z ben-z deleted the benz/zstd branch December 28, 2024 19:12
ben-z added a commit to WATonomous/cvmfs-ephemeral that referenced this pull request Dec 28, 2024
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.

Support zstd decompression
1 participant