Re: how to compress files

new topic     » goto parent     » topic index » view thread      » older message » newer message
sergelli said...

My version is deprecated.

gzip -V
gzip 1.3.12

I missed that you said gzip.exe earlier. This works fine on a sane OS, but you can't do redirection with system_exec() on Windoze. That never worked.

Copying the original file and then compressing the copy with gzip (without either -c or redirection) should still work with system_exec(). This is probably the easiest method, if you have enough space to make a full sized copy of the original file.

Or you can use system(), and find some other method to determine if gzip was successful or not. (Perhaps an MS-DOS batch script that writes the return code of gzip into a text file.)

Or you can use pipeio and write code to take the output of gzip and place it into a file yourself.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu