Closed smalos closed 4 years ago
Actually compressors are implemented as stream compressors. Every line is fed to the class that extends CompressManagerFactory, and it is writen to the compressed stream, so there is no need to store it on memory.
If we don't use a stream compressor, a very big dump has to be stored in memory and then compressed, so an out of memory could happen. Using stream compressors, data is compressed on the fly.
I am not aware of any stream compressor for zip in PHP.
Let's close this. My ZIP implementation doesn't seem to work well for larger dumps, just small ones.
ZIP is one of the most widely used compressed file formats. Could you add support for it?
Here's my take on it. I'm not quite sure what's the best way to implement addFromString() as it expects a file name. I introduced a $filenameOnly variable that is passed to it. Is there an easier/better way to do it?
Add ZIP to the list of List of available compression methods:
Add Mysqldump::ZIP to $enums:
Add new class CompressZip: