ssync


License

License

GroupId

GroupId

com.socrata
ArtifactId

ArtifactId

ssync
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

ssync
ssync
Project URL

Project URL

http://www.github.com/socrata/ssync
Project Organization

Project Organization

com.socrata
Source Code Management

Source Code Management

https://github.com/socrata/ssync

Download ssync

How to add to project

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

Dependencies

test (2)

Group / Artifact Type Version
org.scalatest : scalatest_2.10 jar 2.1.0
org.scalacheck : scalacheck_2.10 jar 1.11.3

Project Modules

There are no modules declared in this project.

SSync

A Java and Haskell implementation of the rsync algorithm.

Note that this is not an implementation of rsync itself! The data it produces is not compatible with either rsync or librsync. It is merely an implementation of the signature-generation, delta-analysis, and patch-application as described in the paper linked above.

Java

To compute the signature of a file, use SignatureComputer.compute or a SignatureComputer.SignatureFileInputStream; to create a patch, read the generated signature data into a SignatureTable and pass it together with an input stream to PatchComputer.compute or a PatchComputer.PatchComputerInputStream to build a patch, and finally send the patch together with a BlockFinder to PatchApplier.apply or a PatchApplier.PatchInputStream to generate the new file.

The use of these classes is demonstrated in the class com.socrata.ssync.SSync.

Haskell

The SSync library uses conduit for streaming data.

The produceSignatureTable conduit will digest a byte-stream into a signature file, which can itself be read into a SignatureTable value via consumeSignatureTable. If the signature table is malformed, consumeSignatureTable will throw a SignatureTableException. The patchComputer conduit can combine the signature table with a stream of bytes to produce a patch file. Finally, the patchApplier conduit can combine the patch file with the data from the file being patched to produce the target.

The use of these functions is demonstrated in the code for the ssync executable.

The ssync library (but not the executable) is compatible with GHCJS (note: GHCJS is currently a moving target; ssync has been built with the version at commit 100fa6d67). When using GHCJS, the only HashAlgorithm available is MD5.

The binary-equivalence-test.sh file contains tests that ensure the Java and Haskell versions produce exactly the same output for the same input.

com.socrata

Socrata, Inc.

Libraries & SDKs here, platform repositories in http://github.com/socrata-platform.

Versions

Version
1.0.0