com.davidehrmann.vcdiff:vcdiff-core

A Java implementation of VCDIFF, RFC-3284

License

License

Categories

Categories

IDE Development Tools
GroupId

GroupId

com.davidehrmann.vcdiff
ArtifactId

ArtifactId

vcdiff-core
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

A Java implementation of VCDIFF, RFC-3284

Download vcdiff-core

How to add to project

<!-- https://jarcasting.com/artifacts/com.davidehrmann.vcdiff/vcdiff-core/ -->
<dependency>
    <groupId>com.davidehrmann.vcdiff</groupId>
    <artifactId>vcdiff-core</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.davidehrmann.vcdiff/vcdiff-core/
implementation 'com.davidehrmann.vcdiff:vcdiff-core:0.1.1'
// https://jarcasting.com/artifacts/com.davidehrmann.vcdiff/vcdiff-core/
implementation ("com.davidehrmann.vcdiff:vcdiff-core:0.1.1")
'com.davidehrmann.vcdiff:vcdiff-core:jar:0.1.1'
<dependency org="com.davidehrmann.vcdiff" name="vcdiff-core" rev="0.1.1">
  <artifact name="vcdiff-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.davidehrmann.vcdiff', module='vcdiff-core', version='0.1.1')
)
libraryDependencies += "com.davidehrmann.vcdiff" % "vcdiff-core" % "0.1.1"
[com.davidehrmann.vcdiff/vcdiff-core "0.1.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.21

test (2)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.21
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

CircleCI Coverage Status Maven Central

VCDiff-java

A Java port of Google's open-vcdiff vcdiff (RFC3284) implementation. It's currently synced with open-vcdiff 0.8.4.

Download

Maven:

<dependency>
    <groupId>com.davidehrmann.vcdiff</groupId>
    <artifactId>vcdiff-core</artifactId>
    <version>0.1.1</version>
</dependency>

Gradle:

compile 'com.davidehrmann.vcdiff:vcdiff-core:0.1.1'

Usage

Encoding (compressing)

byte[] dictionary = ...;
byte[] uncompressedData = ...;
OutputStream compressedData = ...;

// OutputStream (like GZIPOutputStream) and stream-based encoders are
// also available from the builder.
VCDiffEncoder<OutputStream> encoder = VCDiffEncoderBuilder.builder()
    .withDictionary(dictionary)
    .buildSimple();

encoder.encode(uncompressedData, compressedData);

Decoding (decompressing)

byte[] dictionary = ...;
byte[] compressedData = ...;
OutputStream uncompressedData = ...;

// InputStream (like GZIPInputStream) and stream-based decoders are
// also available from the builder.
VCDiffDecoder decoder = VCDiffDecoderBuilder.builder().buildSimple();
decoder.decode(dictionary, compressedData, uncompressedData);

Command line usage

The command line wrapper for java-vcdiff is generally compatble with the open-vcdiff implementation:

# Compress original with dictionary dict to compressed.vcdiff
java com.davidehrmann.vcdiff.VCDiffFileBasedCoder encode -dictionary dict -delta compressed.vcdiff -target original

# Decompress compressed.vcdiff with dictionary dict to decompressed
java com.davidehrmann.vcdiff.VCDiffFileBasedCoder decode -dictionary dict -delta compressed.vcdiff -target decompressed

# Usage details
java com.davidehrmann.vcdiff.VCDiffFileBasedCoder help

The command line tool is available in the Central Repository

Maven:

<dependency>
    <groupId>com.davidehrmann.vcdiff</groupId>
    <artifactId>vcdiff-cli</artifactId>
    <version>0.1.1</version>
</dependency>

Gradle:

compile 'com.davidehrmann.vcdiff:vcdiff-cli:0.1.1'

Compatability

xdelta3

xdelta3 has extensions that aren't currently supported by vcdiff-java: the application header, adler32 checksum, and secondary compression. When encoding, passing -S -A -n to xdelta3 will disable these features.

See also

Versions

Version
0.1.1
0.1.0