Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 PHP ZipArchive 类来创建 ZIP 存档。存档将包含已压缩的 ZIP 文件。因此,压缩已经压缩的 ZIP 文件是没有用的,这只会增加不必要的开销。是否可以使用 ZipArchive 创建 ZIP 存档但不能压缩文件?
目前无法使用 ZipArchive 设置压缩级别。只要您不介意创建 .gz 文件而不是 .zip 文件,就可以使用 Zlib 库设置压缩级别
http://php.net/manual/en/ref.zlib.php