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

Compressing/decompressing files/directories #602

Open
pyrech opened this issue Jan 14, 2025 · 4 comments
Open

Compressing/decompressing files/directories #602

pyrech opened this issue Jan 14, 2025 · 4 comments

Comments

@pyrech
Copy link
Member

pyrech commented Jan 14, 2025

Should we add some helpers to compress and decompress files or directories?

@tigitz
Copy link
Contributor

tigitz commented Jan 15, 2025

Thinking out loud, I'm wondering about the performance of using PHP for compression compared to tools like tar or gunzip. For database dumps, I usually use pigz for faster parallel compression.

I’ve made some helpers for this, but they depend on pigz being installed, which isn’t great for cross-platform use. If PHP-only solutions are much slower, they might not be useful for big files, but they could still work well for smaller ones.

@lyrixx
Copy link
Member

lyrixx commented Jan 27, 2025

@pyrech Do you think of PHP implementation with phar class, or with process using tar, gunzip, etc ?

@pyrech
Copy link
Member Author

pyrech commented Jan 27, 2025

I think it would be better to use native binaries when available (but that would not works for Windows). Maybe we could have a PHP fallback for some formats, for example, with the PHP ZipArchive class (this requires the PHP extension zip though).

@lyrixx
Copy link
Member

lyrixx commented Jan 27, 2025

Let's go :)

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

No branches or pull requests

3 participants