Skip to content

Commit 47cc10b

Browse files
Remove footer constants from OnDiskSequentialGraphIndexWriter in favor of ones in AbstractGraphIndexWriter (#535)
1 parent ddabdb8 commit 47cc10b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/OnDiskGraphIndex.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
import org.slf4j.Logger;
5353
import org.slf4j.LoggerFactory;
5454

55-
import static io.github.jbellis.jvector.graph.disk.OnDiskSequentialGraphIndexWriter.*;
55+
import static io.github.jbellis.jvector.graph.disk.AbstractGraphIndexWriter.FOOTER_MAGIC;
56+
import static io.github.jbellis.jvector.graph.disk.AbstractGraphIndexWriter.FOOTER_MAGIC_SIZE;
57+
import static io.github.jbellis.jvector.graph.disk.AbstractGraphIndexWriter.FOOTER_OFFSET_SIZE;
5658

5759
/**
5860
* A class representing a graph index stored on disk. The base graph contains only graph structure.

jvector-base/src/main/java/io/github/jbellis/jvector/graph/disk/OnDiskSequentialGraphIndexWriter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@
5454
* </ul>
5555
*/
5656
public class OnDiskSequentialGraphIndexWriter extends AbstractGraphIndexWriter<IndexWriter> {
57-
public static final int FOOTER_MAGIC = 0x4a564244; // "EOF magic"
58-
public static final int FOOTER_OFFSET_SIZE = Long.BYTES; // The size of the offset in the footer
59-
public static final int FOOTER_MAGIC_SIZE = Integer.BYTES; // The size of the magic number in the footer
60-
public static final int FOOTER_SIZE = FOOTER_MAGIC_SIZE + FOOTER_OFFSET_SIZE; // The total size of the footer
6157

6258
OnDiskSequentialGraphIndexWriter(IndexWriter out,
6359
int version,

0 commit comments

Comments
 (0)