github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/synchronization/rsync/engine.proto (about)

     1  syntax = "proto3";
     2  
     3  package rsync;
     4  
     5  option go_package = "github.com/mutagen-io/mutagen/pkg/synchronization/rsync";
     6  
     7  // BlockHash represents a pair of weak and strong hash for a base block.
     8  message BlockHash {
     9      // Weak is the weak hash for the block.
    10      uint32 weak = 1;
    11      // Strong is the strong hash for the block.
    12      bytes strong = 2;
    13  }
    14  
    15  // Signature represents an rsync base signature. It encodes the block size used
    16  // to generate the signature, the size of the last block in the signature (which
    17  // may be smaller than a full block), and the hashes for the blocks of the file.
    18  message Signature {
    19      // BlockSize is the block size used to compute the signature.
    20      uint64 blockSize = 1;
    21      // LastBlockSize is the size of the last block in the signature.
    22      uint64 lastBlockSize = 2;
    23      // Hashes are the hashes of the blocks in the base.
    24      repeated BlockHash hashes = 3;
    25  }
    26  
    27  // Operation represents an rsync operation, which can be either a data operation
    28  // or a block operation.
    29  message Operation {
    30      // Data contains data for data operations. If its length is 0, then the
    31      // operation is assumed to be a non-data operation. Operation transmitters
    32      // and receivers may thus treat a length-0 buffer as semantically equivalent
    33      // to a nil buffer and utilize that fact to efficiently re-use buffer
    34      // capacity (e.g. by truncating the buffer but not releasing it).
    35      bytes data = 1;
    36      // Start is the 0-indexed starting block for block operations.
    37      uint64 start = 2;
    38      // Count is the number of blocks for block operations.
    39      uint64 count = 3;
    40  }