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]); }
public void toWire(WireFormat.Writer writer) { writer.writeVarBytes(filter); writer.writeUint32(hashFunctions); writer.writeUint32(tweak); writer.writeByte(update.ordinal()); }