Skip to content

new(google/open-vcdiff): VCDIFF (RFC 3284) encoder/decoder#13141

Merged
jhheider merged 7 commits into
pkgxdev:mainfrom
tannevaled:new/open-vcdiff
Jul 9, 2026
Merged

new(google/open-vcdiff): VCDIFF (RFC 3284) encoder/decoder#13141
jhheider merged 7 commits into
pkgxdev:mainfrom
tannevaled:new/open-vcdiff

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Summary

Adds Google's canonical C++ implementation of the VCDIFF (RFC 3284) generic-differencing format.

Why now

VCDIFF underlies several systems still in use:

  • Chrome's SDCH (Shared Dictionary Compression over HTTP)
  • Google Update protocol (Chromium, Chrome OS)
  • Various delta-update pipelines (e.g. some game patchers, embedded firmware deltas)

The upstream repo was archived on 2023-08-26, but the implementation remains RFC-compliant and is the canonical C++ reference. Nothing newer replaces it.

Build

  • Autotools (autoreconf -fi + ./configure + make); Apache-2.0.
  • Source tarball doesn't include the vendored gtest submodule, but the install path doesn't require it (tests only).

Test plan

Round-trip encode/decode of a small dictionary+target pair, verifying byte-identity after decode. Exercises both the encoder and decoder.

🤖 Generated with Claude Code

@tannevaled

Copy link
Copy Markdown
Contributor Author

Parking this PR — source build needs vendored gflags submodule + custom m4 macros.

After 3 iterations, the structural issue is that open-vcdiff's configure.ac uses Google-custom autoconf macros (AC_CXX_STL_NAMESPACE, AC_DEFINE_GOOGLE_NAMESPACE) that live in the gflags/m4/ git submodule, which is not in the GitHub archive tarball.

To make this work properly, the recipe would need to:

  1. git clone https://github.com/gflags/gflags.git (at a specific submodule sha — not preserved in the tarball)
  2. Optionally clone gtest too (only for unit tests, not the binary)
  3. Then autoreconf -fi with -I gflags/m4

Or patch configure.ac to drop the legacy Google macros (AC_CXX_STL_NAMESPACE is obsolete — all C++ now uses std:: namespace).

Since this is an archived upstream (last commit 2023-08-26) and the recipe is a 30-line autotools build, the maintenance ROI is low. Leaving the PR open for review — happy to invest further iterations if maintainers consider it worth it, otherwise closing in favor of a leaner fix later.

Symptoms documented in the recipe / commit log:

  • Iter 1 (`d5394f6c`): `not-found: version` (default github releases endpoint hit empty — 0 releases, 5 tags)
  • Iter 2 (`e0d4f1af`/`2051bb63`): switched to `/tags` + ignored 2-part `open-vcdiff-0.8` → version resolution worked
  • Iter 3 (`f5f7971a`): `mkdir -p gflags/m4 gtest` to satisfy autoreconf's directory probe → uncovered the next layer: m4 macros themselves are missing, not just the dir

tannevaled and others added 4 commits July 7, 2026 19:00
Canonical Google C++ implementation of the VCDIFF generic
differencing format (RFC 3284). Used by Chrome's SDCH, Google's
update protocol, and various delta-compression schemes.

Upstream archived 2023-08-26; this remains the reference
implementation. Apache-2.0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two compounding bugs in version resolution:

1. Upstream publishes git tags but ZERO GitHub Releases. Default
   `github: <repo>` mode queries /releases — empty. Switched to
   `github: google/open-vcdiff/tags`.

2. Tag `open-vcdiff-0.8` is 2-part — strict semver rejects.
   Added to `ignore:`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@tannevaled tannevaled force-pushed the new/open-vcdiff branch 2 times, most recently from 8c88388 to d579dc6 Compare July 7, 2026 17:06
The release tarball is a git-archive of the tag and no longer contains
the in-tree gflags/gtest sources the shipped configure.ac / Makefile.am
reference (they were Google-Code svn trees, dropped at GitHub migration,
never submodules). autoreconf therefore dies on the missing
gflags/src/gflags/*.h.in, and even past that `make` cannot build the
bundled libgflags the vcdiff binary links against.

Skip the build system: the library sources are self-contained under the
open_vcdiff namespace, so compile them straight into a static vcdiff with
a minimal portable config.h, linking the packaged gflags. This also drops
the 2010 config.sub/libtool that couldn't target arm64.

Verified on darwin/aarch64: builds + encode/decode round-trip identical.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jhheider added 2 commits July 9, 2026 12:17
Removed platform specifications and simplified build commands.
Updated PLATFORM_FLAGS to use a list format for better readability.
@jhheider jhheider merged commit 486b0d1 into pkgxdev:main Jul 9, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants