A trusted library for generating .rar or .zip files


is anyone using a proven and up-to-date library in their projects to generate .rar or .zip files that contain files generated from a user download site?

Thanks from the replies.


For the topic RAR files, see also:

For my own I use PHP 's native ZipArchive class, which provides everything you need to create an ZIP archive and protect it via password. There is no need for another dependency in the form of another library.

I guess there is no up to date library, which does exactly what you want. If the user resource is public, just fetch the file content and store it directly into the zip archive.

As froschdesign already said, generating rar files is a slightly pain in the ass. Of course, you can also do this with a little more effort. But you should always ask yourself whether it is worth it.

1 Like

The same here. I also use the ZipArchive from PHP directly. I don’t know if the ZIP adapter for Flysystem still works.

And never used the corresponding filter of laminas-filter: