Class OffsetPair

java.lang.Object
io.milton.zsync.OffsetPair

public class OffsetPair extends Object
An object representing a single match between a block on the client file and a block on the server file. The Pair (localOffset, remoteBlock) means that the block in the local file at byte localOffset is identical to block number remoteBlock in the remote file.
Author:
Nick
  • Field Details

    • localOffset

      public final long localOffset
      The byte offset of the block in the local file
    • remoteBlock

      public final long remoteBlock
      The index of the block in the remote file
  • Constructor Details

    • OffsetPair

      public OffsetPair(long offset, long blockIndex)
      Constructs an immutable OffsetPair.
      Parameters:
      offset - The start byte of the local block
      blockIndex - The index of the remote block