In my application I have to create some zip files and send them in mail through PHP.
Creating Zip files functionality is done using ZipArchive class. but it reducing file size up to 35-40 %. My client wants more then 60% size reduction.
Is there any other library or way to to this with ZipArchive class?
Is it possible with shell command which I can execute in my php script using exec() ?
The zip algorithm should be the same regardless of the library you are using. So you can’t expect an improvement by using a different library. Perhaps a different archive algorithm might suit your content better.
The compression rate largely depends on the content being compressed. By example, you’ll get a very good compression rate when compressing a text file containing nothing but ‘a’ characters, but an irrelevant compression rate for an mp3 by example.