ANDREA wrote:So please, can you inform me on the procedure to use gZip?
What do you mean with
I tested STDIN/STDOUT redirection and pipe mode under Windos
Help, please.
Beg your pardon, but I never used DOS (my fault).
Bye
Andrea
Andrea,
I suppose your default association of the .gz file ending is with WinRar. I.e. if you click under Windows on the gz-packed elevation map, WinRar will always be started. That's also fine like this.
gzip is a pure /command-line/ utility. So open a Windows (DOS) console in some arbitrary directory and first type just 'gzip' without any arguments. Then you should get some help text output for gzip in the console. If you get the help, then gzip was properly installed.
Next you do a gz-compression test. First list the files in the respective directory by typing at the console prompt: 'dir'. Choose a not so important file (no matter which one). For definiteness I'll use the file name README.1st. Any other filename will do as well, of course. We compress it with gzip by typing in the console
As a control, type once more 'dir' and look for the compressed file README.1st.gz. Next you unpack it again by typing
That restores the file README.1st in your directory.
If that worked you are perfectly ready for action!
The next exercise is to use
STDIN/STDOUT redirection instead of a filename argument to gzip as above. As the names say, STDIN/STDOUT are so called
generic input and output "filehandles", respectively. These you may redirect with the '<' and '>' operators to actual filenames as follows
Aha, note the option -c is to tell gzip that gzip is to work now with generic STDIN and STDOUT input/output rather than specific filenames as commandline arguments. The command above says to use README.1st as input file, gz-compress it and output the result into a file named out.gz.
You will ask for sure : why all this? Specific filenames are even simpler in syntax...
Well the great benefit comes next, namely the 'pipe' feature that ALL platforms (UNIX/LINUX Windows and MAC-OSX) support and the GUI - (click) users tend to ignore...
Programs supporting STDIN/STDOUT operation can be piped together like "pipe fittings" in the sense that the output of program1 becomes the input of program2 etc, without ever using specific filenames. Typically you then can chain long sequences of programs together by writing
Code: Select all
program1 < <input.file> | program2 | program3 | program4 > <output.file>
Here <input.file> and <output.file> have of course to be replaced by concrete names of files.
I hope this helps...
Cheers,
Fridger