ostore.dataobj
Class RabinFingerprint
java.lang.Object
|
+--ostore.dataobj.RabinFingerprint
- public class RabinFingerprint
- extends Object
Given an InputStream, creates blocks delimited by markers chosen for
their Rabin fingerprint. See the paper, "A Protocol-Independent
Technique for Eliminating Redundant Network Traffic" by N. Spring and D.
Wetherall in SIGCOMM 2000.
- Version:
- $Id: RabinFingerprint.java,v 1.3 2002/11/18 21:14:04 srhea Exp $
- Author:
- Sean C. Rhea
|
Constructor Summary |
RabinFingerprint()
Computes some constants to be used later. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_SZ
public final int MIN_SZ
- See Also:
- Constant Field Values
MAX_SZ
public final int MAX_SZ
- See Also:
- Constant Field Values
P
protected int P
P_UP_BETA_TIMES_T
protected int[] P_UP_BETA_TIMES_T
M
protected int M
BETA
protected int BETA
FRACTION
protected int FRACTION
_t
protected int[] _t
_t_idx
protected int _t_idx
_rf
protected int _rf
_head
protected RabinFingerprint.BufEl _head
_tail
protected RabinFingerprint.BufEl _tail
_head_idx
protected int _head_idx
_all_data_added
protected boolean _all_data_added
count
protected int count
- Get the next chunk. This function returns the number of bytes in
the next chunk, which is written into the array
result
starting at the index offset. If zero is returned,
then all of the input has been consumed.
RabinFingerprint
public RabinFingerprint()
- Computes some constants to be used later.
add_data
public void add_data(BufferElement buf)
set_all_data_added
public void set_all_data_added()
reset
public void reset()
- Start reading out of a new input stream.
next_chunk
public int next_chunk(byte[] result,
int[] offset)
main
public static void main(String[] args)
throws Exception
Exception