Hi, i finished my storage compression patch for rsync. WARNING - THIS IS ONLY FOR TESTING! How does this work? Just add a "-Z" option to your common rsync commandline parameters. The destination files will be stored in a compressed way (by using a hardwired call of gzip). This works in both directions: rsync -Z -av mydir user@remote:/dir and rsync -Z -av user@remote:/dir localdir The remote:/dir and localdir will keep the files compressed. If you want to compress or decompress any local directory, add a link to the rsync exe file: ln -s rsync rscompress and ln -s rsync rsuncompress With "rscompress" you can compress a local directory (e.g. if you want to use existing files without wanting to transfer then first from your server). rsuncompress will decomress a compressed directory. I have no idea if this works with: links, devices and any other strange stuff. Also make sure if you use rsync over a network connection that there is gzip in your $PATH if the destionation side should be saved compressed. WARNING! I have no idea if the system( "gzip ..." ) call might be a security issue! A final advise. This is only for testing ;) -- Bye, Harald Email: fielker@informatik.fh-augsburg.de ICQ: #15582696 A cool os: www.linux.org PGP Finger-print: C2 8F 7B 55 7B 9B 8C 7E 48 35 48 21 8A DF 01 66 -------------- next part -------------- A non-text attachment was scrubbed... Name: rsync-2.5.5-compression Type: text/x-diff Size: 26011 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20030118/cafe48bd/rsync-2.5.bin
Harald, You might consider using zlib instead of gzip; same algorithm, same author, but you can access the compression code via a subroutine interface. You would not have to spawn another process to run gzip, and you would not be dependent upon the user having gzip installed. It is not covered by the GPL but I believe that its license is compatible with the GPL. However, I'd welcome a second opinion on that. See http://www.gzip.org/zlib/ PG -- Paul Green, Senior Technical Consultant, Stratus Computer, Inc. Voice: +1 978-461-7557; FAX: +1 978-461-3610; Video on request. Speaking from Stratus not for Stratus