Thursday 29 November 2012

Compression

You know that Rebol compress function compress data, but you can manipulate also TAR.GZ archives and ZIP archives.
For TAR.GZ archives there are the following script:
They can be used this way:
do %tar.r
do %gzip.r
write/binary %test.tgz gzip tar [%some-files ...]


Resulting archive is usually smaller than a *.zip of the same files
To decompress use  gunzip.r script

For ZIP archives there is the following script: http://www.rebol.org/download-a-script.r?script-name=rebzip.r
usage: zip/deep %new-zip.zip [ %readme.txt "An example" ftp://192.168.1.10/my-file.txt %my-directory/ ]
to unzip unzip %new-zip.zip

If you want to only explore a zip file without decompress it, you can use this script: http://www.rebol.org/download-a-script.r?script-name=zip.r

No comments:

Post a Comment