Jump to content

gzencode a very large file


a1amattyj

Recommended Posts

Hello,

 

I have a script that produces a mysql backup which can get very big. In this case a file is 117mb big.

 

The script makes the text file as .txt format

 

However, i need to compress this file for bandwidth and space reasons.

 

If the file is below a certain size, this works fine, however, obviously it causes a memory usage error as the file cant read a 117mb big file.

 

$contents = implode("", file($do_file));
$gzdata = gzencode($contents, 9);

 

Whats the best way to go about compressing these large files without ini_ settings the memory usages. Naturally a database will grow so ini_ 'ing it wouldn't be suitable.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/196123-gzencode-a-very-large-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.