I need a script which tars and gzips few selected directories/files and sends it to browser. All the code I have seen on net either
1. creates a local file and then sends it to browser
or
2. creates the archive in memory (expensive for large archives) and sends it to browser.
I want neither of them, but want to send the gzip stream directly to the browser as and when created (like "download home directory" link in cpanel->backup). This will enable download to start immediately without the entire archive being created in memory or on disk.
How can I achieve this? Any links to working scripts will be really helpful.
1. creates a local file and then sends it to browser
or
2. creates the archive in memory (expensive for large archives) and sends it to browser.
I want neither of them, but want to send the gzip stream directly to the browser as and when created (like "download home directory" link in cpanel->backup). This will enable download to start immediately without the entire archive being created in memory or on disk.
How can I achieve this? Any links to working scripts will be really helpful.
