Socket
Book a DemoInstallSign in
Socket

vcdiff

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vcdiff

0.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

VCDiff

This is a wrapper around Google's open-vcdiff library, which provides an encoder and decoder for the format described in RFC 3284: "The VCDIFF Generic Differencing and Compression Data Format." The encoding strategy is largely based on Bentley-McIlroy 99: "Data Compression Using Long Common Strings.

For more details visit: http://code.google.com/p/open-vcdiff

Installing

# Install the gem:
sudo gem install romanbsd-vcdiff

Usage

require 'VCDiff'

# Encoding
dictionary = IO.read('dictionary_file')
modified = IO.read('modified_file')
# Optional
encoder.format_flags = VCDiff::VCD_FORMAT_INTERLEAVED | VCDiff::VCD_FORMAT_CHECKSUM
encoder = VCDiff::Encoder.new(dictionary)
res = encoder.encode(modified)

# Decoding
decoder = VCDiff::Decoder.new
orig = decoder.decode(dictionary, res)

orig == modified	# -> true

FAQs

Package last updated on 29 Nov 2009

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.