Skip to content

refactor: 使用 zstd 替代 gzip 压缩 - #25

Closed
iven wants to merge 1 commit into
mainfrom
iven/zstd-compression
Closed

refactor: 使用 zstd 替代 gzip 压缩#25
iven wants to merge 1 commit into
mainfrom
iven/zstd-compression

Conversation

@iven

@iven iven commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

将归档压缩方式从 tar+gzip 改为 tar+zstd,使用 Python 库而非 CLI 调用。

主要改动:

  • 添加 zstandard 依赖
  • 使用 tarfile 和 zstandard 库替代 tar CLI
  • 文件扩展名从 .tar.gz 改为 .tar.zst
  • 使用 filter='data' 增强解压安全性

优势:

  • 更快的压缩/解压速度
  • 更好的压缩率
  • 纯 Python 实现,跨平台兼容性更好
  • 自动避免 macOS 扩展属性导致的跨平台问题(不会产生 ._ 文件)

将归档压缩方式从 tar+gzip 改为 tar+zstd,使用 Python 库而非 CLI 调用。

主要改动:
- 添加 zstandard 依赖
- 使用 tarfile 和 zstandard 库替代 tar CLI
- 文件扩展名从 .tar.gz 改为 .tar.zst
- 使用 filter='data' 增强解压安全性

优势:
- 更快的压缩/解压速度
- 更好的压缩率
- 纯 Python 实现,跨平台兼容性更好
- 自动避免 macOS 扩展属性导致的跨平台问题(不会产生 ._ 文件)
@iven
iven added this pull request to the merge queue Feb 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 9, 2026
@iven iven closed this Feb 9, 2026
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.

1 participant