bloom

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

package bloom creates and serves bloom filters for canonical names, and names of viruses. The filters are persistent throughout the life of the program. The filters are used to find exact matches to the database data fast.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filters

type Filters struct {
	// Canonical is a filter for matching with canonical names.
	Canonical *baseBloomfilter.Bloomfilter
	// CanonicalSize is number of entries in 'simple' canonical filter. It is
	// used as an option during Canonical filter creation.
	CanonicalSize uint
	// CanonicalFull is a filter for matching with full canonical names.
	CanonicalFull *baseBloomfilter.Bloomfilter
	// CanonicalFullSize is number of entries in 'full' canonical filter. It is
	// used as an option during CanonicalFull filter creation.
	CanonicalFullSize uint
	// Virus is a filter for matching with viruses names.
	Virus *baseBloomfilter.Bloomfilter
	// VirusesSize is a number of entries if 'viruses' filter.
	VirusSize uint
}

Filters contain bloom filters data we use for matching.

func GetFilters

func GetFilters(path string, d dbase.Dbase) (*Filters, error)

GetFilters returns bloom filters for name-string matching. If filters had been already created before, it just returns them. Otherwise it creates filters from either database, or from cached files. Creating filters from cache is significantly faster.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL