mcmilk / 7-Zip-zstd

7-Zip with support for Brotli, Fast-LZMA2, Lizard, LZ4, LZ5 and Zstandard
https://mcmilk.de/projects/7-Zip-zstd/
Other
4.87k stars 293 forks source link

Change zstd extension names #327

Closed defrag257 closed 1 year ago

defrag257 commented 1 year ago

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

mcmilk commented 1 year ago

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

defrag257 commented 1 year ago

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 commented 1 year ago

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

mcmilk commented 1 year ago

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 commented 1 year ago

I rebased the commits and merged it.