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

Change zstd extension names #327

Closed
wants to merge 5 commits into from
Closed

Conversation

defrag257
Copy link
Contributor

@defrag257 defrag257 commented May 28, 2023

Change zstd extension names (for 7zFM archive creation dialog and 7z console edition) to zst tzst.

Change zstd extensions to `zst tzst`.
@defrag257 defrag257 marked this pull request as ready for review May 28, 2023 12:29
@defrag257 defrag257 changed the title Update ZstdHandler.cpp Change zstd extension names May 28, 2023
@mcmilk
Copy link
Owner

mcmilk commented May 28, 2023

I think some support for .zstd should be left ... so up2now generated archives can be read without hassle.

@defrag257
Copy link
Contributor Author

I think some support for .zstd should be left ... so up2now generated archives can be read without hassle.

Extraction uses magic numbers to detect file type... so this change doesn't affect it.
It affects existing scripts using 7z.exe to create an archive without specifying -tzstd:

7z a abc.tar.zstd abc.tar        # does not work after this change
7z a -tzstd abc.tar.zstd abc.tar # still works

If this compatibility is necessary, I think the code could be changed to:

REGISTER_ARC_IO(
  "zstd", "zst zstd tzst tzstd", "* * .tar .tar", 0x0e,
  k_Signature,
  0,
  NArcInfoFlags::kKeepName,
  0,
  IsArc_zstd)

@defrag257
Copy link
Contributor Author

GzHandler.cpp uses the same pattern, so it should work.

@mcmilk
Copy link
Owner

mcmilk commented May 28, 2023

GzHandler.cpp uses the same pattern, so it should work.

I also think this should work. I will squash the commits together and apply them later.
Thanks a lot.

@mcmilk
Copy link
Owner

mcmilk commented May 28, 2023

I rebased the commits and merged it.

@mcmilk mcmilk closed this May 28, 2023
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.

None yet

2 participants