Esempio n. 1
0
 public static BloomFilter fromWire(WireFormat.Reader reader) {
   byte[] data = reader.readVarBytes();
   long hashFunctions = reader.readUint32();
   long tweak = reader.readUint32();
   int update = reader.readByte();
   return new BloomFilter(data, hashFunctions, tweak, UpdateMode.values()[update]);
 }
Esempio n. 2
0
 public void toWire(WireFormat.Writer writer) {
   writer.writeVarBytes(filter);
   writer.writeUint32(hashFunctions);
   writer.writeUint32(tweak);
   writer.writeByte(update.ordinal());
 }