Creating a gz file from multiple temporary files ?
Posted: Sat Jul 26, 2003 9:12 am
Hi,
I am triyng to create 1 general gz file compressings between 10 and 200 files that are extracted from an uploaded file.
example :
the submited file is a text file containing 200 characters.
I wuold like to create a new file called "1.txt" containing the first 3 characters (1,2,3) , then a file called "2.txt" containing the next 3 char (2,3,4) etc until the end.
Finally, I would like the function to offer to download a single file, AlltextFiles.gz containing all the 200 files created by the script.
The files do not have to be stored afterwards on the server, so I would like to avoid making a directory, storing the files, gzipping sending the result file and erasing th txt files.
I need help on two point,
how to create and and to a gz file several new files.
how to do it when those files are temp files.
If sone has idears or has done similar things, any help welcome.

I am triyng to create 1 general gz file compressings between 10 and 200 files that are extracted from an uploaded file.
example :
the submited file is a text file containing 200 characters.
I wuold like to create a new file called "1.txt" containing the first 3 characters (1,2,3) , then a file called "2.txt" containing the next 3 char (2,3,4) etc until the end.
Finally, I would like the function to offer to download a single file, AlltextFiles.gz containing all the 200 files created by the script.
The files do not have to be stored afterwards on the server, so I would like to avoid making a directory, storing the files, gzipping sending the result file and erasing th txt files.
I need help on two point,
how to create and and to a gz file several new files.
how to do it when those files are temp files.
If sone has idears or has done similar things, any help welcome.