bloomfilter

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2023 Huawei Cloud Computing Technologies Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bloomfilter

type Bloomfilter interface {
	Add(hash uint64)
	Hit(hash uint64) bool
	GetBytesOffset(hash uint64) int64
	LoadHit(hash uint64, loadHash uint64) bool
	Data() []byte
	Clear()
}

func DefaultOneHitBloomFilter

func DefaultOneHitBloomFilter(version uint32) Bloomfilter

func NewOneHitBloomFilter

func NewOneHitBloomFilter(bytes []byte, version uint32) Bloomfilter

type OneHitBloomFilter

type OneHitBloomFilter struct {
	// contains filtered or unexported fields
}

func (*OneHitBloomFilter) Clear

func (b *OneHitBloomFilter) Clear()

func (*OneHitBloomFilter) Data

func (b *OneHitBloomFilter) Data() []byte

type OneHitBloomFilterV0

type OneHitBloomFilterV0 struct {
	OneHitBloomFilter
}

func (*OneHitBloomFilterV0) Add

func (b *OneHitBloomFilterV0) Add(hash uint64)

func (*OneHitBloomFilterV0) GetBytesOffset

func (b *OneHitBloomFilterV0) GetBytesOffset(hash uint64) int64

func (*OneHitBloomFilterV0) Hit

func (b *OneHitBloomFilterV0) Hit(hash uint64) bool

func (*OneHitBloomFilterV0) LoadHit

func (b *OneHitBloomFilterV0) LoadHit(hash uint64, loadHash uint64) bool

type OneHitBloomFilterV2

type OneHitBloomFilterV2 struct {
	OneHitBloomFilter
}

func (*OneHitBloomFilterV2) Add

func (b *OneHitBloomFilterV2) Add(hash uint64)

func (*OneHitBloomFilterV2) GetBytesOffset

func (b *OneHitBloomFilterV2) GetBytesOffset(hash uint64) int64

func (*OneHitBloomFilterV2) Hit

func (b *OneHitBloomFilterV2) Hit(hash uint64) bool

func (*OneHitBloomFilterV2) LoadHit

func (b *OneHitBloomFilterV2) LoadHit(hash uint64, loadHash uint64) bool

type OneHitBloomFilterV3

type OneHitBloomFilterV3 struct {
	OneHitBloomFilter
}

func (*OneHitBloomFilterV3) Add

func (b *OneHitBloomFilterV3) Add(hash uint64)

func (*OneHitBloomFilterV3) GetBytesOffset

func (b *OneHitBloomFilterV3) GetBytesOffset(hash uint64) int64

func (*OneHitBloomFilterV3) Hit

func (b *OneHitBloomFilterV3) Hit(hash uint64) bool

func (*OneHitBloomFilterV3) LoadHit

func (b *OneHitBloomFilterV3) LoadHit(hash uint64, loadHash uint64) bool

Jump to

Keyboard shortcuts

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