Harald Fielker wrote: > Am Samstag, 18. Januar 2003 22:54 schrieb Max Bowsher: >> Green, Paul wrote: >>> You might consider using zlib instead of gzip; same algorithm, same >>> author, but you can access the compression code via a subroutine > > Do you have an idea how i can use it for compressing a whole file? > > Is there a de/compress (char *file) function? > >>> interface. You would not have to spawn another process to run gzip, >>> and you would not be dependent upon the user having gzip installed. > > You are right - an internal compression to rsync would be nice. But i > would also suggest having a userdefinable option for the compressing > program. I prefer lzo (http://www.oberhumer.com/opensource/lzo/). The > compressor depends on the files you are using, e.g. bzip2 is good for > small textfiles - lzo is fast and can be used for large database > files where there are changes every 3-4 days. > >> Well, I presume it is, since it's what rsync uses to implement >> in-transfer compression (-z option). >> >> Which means you shouldn't even need to deal with adding it to the >> rsync build system. > > Just tell me the function i have to call ;)
I believe gzopen/gzread/gzwrite/gzclose would be the easiest to use. Max. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html