22 Jun 2013 04:32:47 UTC
- Distribution: Vcdiff-OpenVcdiff
- Module version: 0.106
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (78 / 2 / 0)
- KwaliteeBus factor: 0
- 72.46% Coverage
- License: perl_5
- Activity24 month
- Download (5.26KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionFRACTAL Doug Hoyte
Vcdiff::OpenVcdiff - open-vcdiff backend for Vcdiff
use Vcdiff::OpenVcdiff; my $delta = Vcdiff::OpenVcdiff::diff($source, $target); my $target2 = Vcdiff::OpenVcdiff::patch($source, $delta); ## $target2 eq $target
This module is a backend to the Vcdiff module and isn't usually used directly.
The alien package installs the
vcdiffbinary for your convenience but this module uses the
libvcddec.soshared libraries so that the diffing computation is done in-process instead of forking processes.
open-vcdiff has a really cool feature that lets you re-use "hashed dictionaries" for multiple diff operations (but this module doesn't expose that yet).
Even with the streaming API
open-vcdiffhas a hard upper-limit of 2G file sizes and the default (which this module hasn't changed) is 64M so be warned.
If the source argument is a file handle, Vcdiff::OpenVcdiff will try to
mmap(2)the entire file into memory with Sys::Mmap. As well as adding a dependency, this means that source files must be able to fit in your address space. Because of the file size limitation described above, this shouldn't be an issue. See the "STREAMING API" section of Vcdiff for more details.
The Alien::OpenVcdiff dependency takes a long time to compile compared to Vcdiff::Xdelta3 although it's not a completely fair comparison because the alien module also runs open-vcdiff's test-suite (which is good).
The library writes to standard error in the event of errors and I don't believe there is any way to silence these messages.
Copyright 2013 Doug Hoyte.
This module is licensed under the same terms as perl itself.
Module Install Instructions
To install Vcdiff::OpenVcdiff, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Vcdiff::OpenVcdiff
For more information on module installation, please visit the detailed CPAN module installation guide.