Class Configuration

java.lang.Object
io.milton.zsync.Configuration
All Implemented Interfaces:
Serializable, Cloneable

public class Configuration extends Object implements Cloneable, Serializable
A Configuration is a mere collection of objects and values that compose a particular configuration for the algorithm, for example the message digest that computes the strong checksum.

Usage of a Configuration involves setting the member fields of this object to thier appropriate values; thus, it is up to the programmer to specify the strongSum, weakSum, blockLength and strongSumLength to be used. The other fields are optional.

Version:
$Revision: 1.9 $
Author:
Casey Marshall
See Also:
  • Field Details

    • BLOCK_LENGTH

      public static final int BLOCK_LENGTH
      The default block size.
      See Also:
    • CHUNK_SIZE

      public static final int CHUNK_SIZE
      The default chunk size.
      See Also:
    • strongSum

      public transient MessageDigest strongSum
      The message digest that computes the stronger checksum.
    • weakSum

      public transient RollingChecksum weakSum
      The rolling checksum.
    • blockLength

      public int blockLength
      The length of blocks to checksum.
    • strongSumLength

      public int strongSumLength
      The effective length of the strong sum.
    • doRunLength

      public boolean doRunLength
      Whether or not to do run-length encoding when making Deltas.
    • checksumSeed

      public byte[] checksumSeed
      The seed for the checksum, to perturb the strong checksum and help avoid collisions in plain rsync (or in similar applicaitons).
    • chunkSize

      public int chunkSize
      The maximum size of byte arrays to create, when they are needed. This vale defaults to 32 kilobytes.
  • Constructor Details

    • Configuration

      public Configuration()
  • Method Details

    • getBlock

      public int getBlock()
    • clone

      public Object clone()
      Overrides:
      clone in class Object