Skip to content

Commit

Permalink
Sync newest openvcdiff.
Browse files Browse the repository at this point in the history
  • Loading branch information
Elly Fong-Jones committed Sep 16, 2015
1 parent f6966a2 commit d0b094d
Show file tree
Hide file tree
Showing 21 changed files with 441 additions and 282 deletions.
3 changes: 0 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ may remove or edit it.
you want to change it or regenerate `configure' using a newer version
of `autoconf'.

You will need to first synchronize gflags and gtest by running
`./fetch_prereq.bat` on Windows or `./fetch_prereq.sh` on other platforms.

The simplest way to compile this package is:

1. `cd' to the directory containing the package's source code and type
Expand Down
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ jsonwriter_test_LDADD = libvcdenc.la libvcdcom.la libgtest_main.la
check_SCRIPTS += src/vcdiff_test.sh
dist_noinst_DATA = testdata/configure.ac.v0.1 \
testdata/configure.ac.v0.2 \
testdata/allocates_4gb.vcdiff
testdata/allocates_4gb.vcdiff \
testdata/size-overflow-delta \
testdata/size-overflow-dictionary \
testdata/size-overflow-error-32 \
testdata/size-overflow-error-64

## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS

Expand Down
69 changes: 57 additions & 12 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
Expand All @@ -20,6 +20,23 @@


VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
Expand Down Expand Up @@ -62,8 +79,8 @@ DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
$(top_srcdir)/gflags/src/gflags/gflags.h.in \
$(top_srcdir)/gflags/src/gflags/gflags_completions.h.in \
$(top_srcdir)/src/config.h.in AUTHORS COPYING ChangeLog \
INSTALL NEWS THANKS compile config.guess config.sub depcomp \
install-sh ltmain.sh missing mkinstalldirs
INSTALL NEWS THANKS ar-lib compile config.guess config.sub \
depcomp install-sh ltmain.sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/gflags/m4/acx_pthread.m4 \
$(top_srcdir)/gflags/m4/google_namespace.m4 \
Expand Down Expand Up @@ -252,6 +269,11 @@ DIST_SOURCES = $(libgflags_la_SOURCES) $(libgtest_main_la_SOURCES) \
$(vcdecoder4_test_SOURCES) $(vcdecoder5_test_SOURCES) \
$(vcdiff_SOURCES) $(vcdiffengine_test_SOURCES) \
$(vcencoder_test_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(dist_man1_MANS)
Expand Down Expand Up @@ -576,7 +598,11 @@ jsonwriter_test_SOURCES = src/jsonwriter_test.cc
jsonwriter_test_LDADD = libvcdenc.la libvcdcom.la libgtest_main.la
dist_noinst_DATA = testdata/configure.ac.v0.1 \
testdata/configure.ac.v0.2 \
testdata/allocates_4gb.vcdiff
testdata/allocates_4gb.vcdiff \
testdata/size-overflow-delta \
testdata/size-overflow-dictionary \
testdata/size-overflow-error-32 \
testdata/size-overflow-error-64

TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
TESTS_ENVIRONMENT = SRCDIR="$(top_srcdir)"
Expand Down Expand Up @@ -682,14 +708,15 @@ gflags/src/gflags/gflags_completions.h: $(top_builddir)/config.status $(top_srcd
cd $(top_builddir) && $(SHELL) ./config.status $@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
Expand Down Expand Up @@ -734,8 +761,11 @@ libvcdenc.la: $(libvcdenc_la_OBJECTS) $(libvcdenc_la_DEPENDENCIES) $(EXTRA_libvc
$(CXXLINK) -rpath $(libdir) $(libvcdenc_la_OBJECTS) $(libvcdenc_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
Expand Down Expand Up @@ -1395,9 +1425,18 @@ distclean-libtool:
-rm -f libtool config.lt
install-man1: $(dist_man1_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
@list1='$(dist_man1_MANS)'; \
list2=''; \
test -n "$(man1dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.1[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
Expand Down Expand Up @@ -1427,8 +1466,11 @@ uninstall-man1:
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
Expand All @@ -1445,8 +1487,11 @@ uninstall-dist_docDATA:
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
install-googleincludeHEADERS: $(googleinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(googleincludedir)" || $(MKDIR_P) "$(DESTDIR)$(googleincludedir)"
@list='$(googleinclude_HEADERS)'; test -n "$(googleincludedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(googleincludedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(googleincludedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
Expand Down Expand Up @@ -1718,7 +1763,7 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
chmod -R a-w $(distdir); chmod u+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
Expand Down
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
# open-vcdiff README

open-vcdiff is an encoder and decoder for the VCDIFF format, as described in [RFC 3284](http://www.ietf.org/rfc/rfc3284.txt): The VCDIFF Generic Differencing and Compression Data Format.
open-vcdiff is an encoder and decoder for the VCDIFF format, as described in
[RFC 3284](http://www.ietf.org/rfc/rfc3284.txt): The VCDIFF Generic Differencing
and Compression Data Format.

You will need to first synchronize gflags and gtest by running `./fetch_prereq.bat` on Windows or `./fetch_prereq.sh` on other platforms.
You will need to first synchronize gflags and gtest by running
`./fetch_prereq.bat` on Windows or `./fetch_prereq.sh` on other platforms.

A library with a simple API is included, as well as a command-line executable that can apply the encoder and decoder to source, target, and delta files. For further details, please refer to [this link](https://github.com/google/open-vcdiff/wiki/How-to-use-openvcdiff).
A library with a simple API is included, as well as a command-line executable
that can apply the encoder and decoder to source, target, and delta files.
For further details, please refer to
[this link](https://github.com/google/open-vcdiff/wiki/How-to-use-openvcdiff).

See [INSTALL](https://github.com/google/open-vcdiff/blob/master/INSTALL) for (generic) installation instructions for C++: basically
See [INSTALL](https://github.com/google/open-vcdiff/blob/master/INSTALL) for
(generic) installation instructions for C++: basically
```bash
./configure && make && make install
```

This should compile the unit tests as well as `vcdiff`, a simple command-line utility to run the encoder and decoder. Typical usage of vcdiff is as follows (the `<` and `>` are file redirect operations, not optional arguments):
This should compile the unit tests as well as `vcdiff`, a simple command-line
utility to run the encoder and decoder. Typical usage of vcdiff is as follows
(the `<` and `>` are file redirect operations, not optional arguments):
```bash
vcdiff encode -dictionary file.dict < target_file > delta_file
vcdiff decode -dictionary file.dict < delta_file > target_file
```

To see the command-line syntax of vcdiff, use `vcdiff --help` or just `vcdiff`.

To call the encoder from C++ code, assuming that dictionary, target, and delta are all `std::string` objects:
To call the encoder from C++ code, assuming that dictionary, target, and delta
are all `std::string` objects:
```c++
#include <google/vcencoder.h> // Read this file for interface details

Expand All @@ -40,8 +50,12 @@ open_vcdiff::VCDiffDecoder decoder;
decoder.Decode(dictionary.data(), dictionary.size(), delta, &target);
```

When using the encoder, the C++ application must be linked with the library options `-lvcdcom` and `-lvcdenc`; when using the decoder, it must be linked with `-lvcdcom` and `-lvcddec`.
When using the encoder, the C++ application must be linked with the library
options `-lvcdcom` and `-lvcdenc`; when using the decoder, it must be linked
with `-lvcdcom` and `-lvcddec`.

To verify that the package works on your system, especially after making modifications to the source code, please run the unit tests using `make check`.
To verify that the package works on your system, especially after making
modifications to the source code, please run the unit tests using `make check`.

For further details, please refer to [this link](https://github.com/google/open-vcdiff/wiki/How-to-use-openvcdiff).
For further details, please refer to
[this link](https://github.com/google/open-vcdiff/wiki/How-to-use-openvcdiff).
10 changes: 5 additions & 5 deletions aclocal.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# generated automatically by aclocal 1.11.6 -*- Autoconf -*-

# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
Expand All @@ -14,8 +14,8 @@

m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
Expand All @@ -38,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11.3], [],
m4_if([$1], [1.11.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])

Expand All @@ -54,7 +54,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.3])dnl
[AM_AUTOMAKE_VERSION([1.11.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
Expand Down
Loading

0 comments on commit d0b094d

Please sign in to comment.