|First of all thank you for the appreciation. |
The problem you are facing is a very common. The solutions is two fold.
1) Increase the "memory_limit" in your PHP.ini
2) Alternatively, need to read file bit by bit and write as a zip file, rather than reading the complete file(s) in the memory and then writing it as a zip file. Hence, not using up the allocated memory.