DenVdmj / xdelta

Automatically exported from code.google.com/p/xdelta (actual: https://github.com/jmacd/xdelta-devel/)
0 stars 0 forks source link

Read VCDIFF from stdin when decoding #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, I've noticed that it's better to avoid all of xdelta's built-in 
compression, to gain in speed and RAM usage, and compress the VCDIFF file 
produced with the compressor I choose which might even produce a smaller file. 
I'm using options "-R -N -0" and it seems more complicated than necessary. Is 
this the proper way to achieve this?

So, when decoding, I haven't found a way to feed the VCDIFF file to xdelta3's 
stdin (so that I decompress it and pipe it to xdelta3). I tried the following:

gzip -dc file.vcdiff | xdelta3 decode - outfile

but doesn't seem to work. Any ideas? In similar spirit it would be nice to 
output the VCDIFF to stdout when encoding (I haven't tried if this is doable).

Thanks for this very useful software,
Dimitris

Original issue reported on code.google.com by ji...@gmx.net on 11 Sep 2012 at 3:42

GoogleCodeExporter commented 9 years ago
The -N and -0 flags are synonymous, you don't need both.  The -R flag will not 
be necessary for you, provided that your inputs are not compressed by some 
other tool.  So as long as your inputs are not compressed by another tool, all 
you need is the -0 flag.

(By the way, in version 3.0.3 I added support for liblzma secondary 
compression, which will probably outperform the gzip stuff you're doing here.  
Try running with "-0 -Slzma"? That will use lzma on each of the three 
independent VCDIFF sections, which should outperform either gzip or lzma on the 
entire vcdiff output. Let me know if that helps for you...)

You can use the standard input and output with the -c flag, just like gzip.  
For the pipe you wrote, try

gzip -dc file.vcdiff.gz | xdelta3 -dc - outfile

Original comment by josh.mac...@gmail.com on 24 Sep 2012 at 4:59