Skip to content

Commit d5e2f63

Browse files
committed
Xor8: remove previous serialization methods
1 parent 145e984 commit d5e2f63

File tree

1 file changed

+0
-29
lines changed
  • fastfilter/src/main/java/org/fastfilter/xor

1 file changed

+0
-29
lines changed

fastfilter/src/main/java/org/fastfilter/xor/Xor8.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.fastfilter.xor;
22

3-
import java.io.*;
43
import java.nio.ByteBuffer;
54

65
import org.fastfilter.Filter;
@@ -164,34 +163,6 @@ private int fingerprint(long hash) {
164163
return (int) (hash & ((1 << BITS_PER_FINGERPRINT) - 1));
165164
}
166165

167-
public byte[] getData() {
168-
try {
169-
ByteArrayOutputStream out = new ByteArrayOutputStream();
170-
DataOutputStream d = new DataOutputStream(out);
171-
d.writeInt(size);
172-
d.writeLong(seed);
173-
d.write(fingerprints);
174-
return out.toByteArray();
175-
} catch (IOException e) {
176-
throw new RuntimeException(e);
177-
}
178-
}
179-
180-
public Xor8(InputStream in) {
181-
try {
182-
DataInputStream din = new DataInputStream(in);
183-
size = din.readInt();
184-
arrayLength = getArrayLength(size);
185-
bitCount = arrayLength * BITS_PER_FINGERPRINT;
186-
blockLength = arrayLength / HASHES;
187-
seed = din.readLong();
188-
fingerprints = new byte[arrayLength];
189-
din.readFully(fingerprints);
190-
} catch (IOException e) {
191-
throw new RuntimeException(e);
192-
}
193-
}
194-
195166
private Xor8(int size, long seed, byte[] fingerprints) {
196167
this.size = size;
197168
this.arrayLength = getArrayLength(size);

0 commit comments

Comments
 (0)