public static GcsFilterRepository Open(string folderPath) { var dataDirectory = new DirectoryInfo(folderPath); var filterStream = DirectoryStream.Open(dataDirectory, "filter-????.dat"); var indexStream = DirectoryStream.Open(dataDirectory, "index-????.dat"); var filterStore = new GcsFilterStore(filterStream); var indexStore = new GcsFilterIndex(indexStream); var fastIndexStore = new PreloadedFilterIndex(indexStore); var repo = new GcsFilterRepository(filterStore, fastIndexStore); return(repo); }
public PreloadedFilterIndex(GcsFilterIndex index) { _index = index; _cache = new Dictionary <uint256, int>(); Load(); }