wordfile

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcreteWordFileCreator

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

func NewConcreteWordFileCreator

func NewConcreteWordFileCreator(name string, folder string, wordSize int64, memShadowed bool) *ConcreteWordFileCreator

func (*ConcreteWordFileCreator) CreateWordFile

func (wfc *ConcreteWordFileCreator) CreateWordFile() error

func (*ConcreteWordFileCreator) CreateWordFileFilledZeros added in v0.0.8

func (wfc *ConcreteWordFileCreator) CreateWordFileFilledZeros(count int64) error

func (*ConcreteWordFileCreator) OpenWordFile

func (wfc *ConcreteWordFileCreator) OpenWordFile() (ReadWriteAtWordCounter, error)

func (*ConcreteWordFileCreator) OpenWordFileReadOnly

func (wfc *ConcreteWordFileCreator) OpenWordFileReadOnly() (ReadAtWordCounter, error)

func (*ConcreteWordFileCreator) WordFileExists

func (wfc *ConcreteWordFileCreator) WordFileExists() bool

type HashFile added in v0.0.7

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

func NewHashFile added in v0.0.7

func NewHashFile(file memfile.AppendableLookupFile, hashCount int64) *HashFile

func (*HashFile) AppendHash added in v0.0.12

func (wf *HashFile) AppendHash(val [32]byte) (int64, error)

func (*HashFile) Close added in v0.0.7

func (wf *HashFile) Close() error

func (*HashFile) CountHashes added in v0.0.7

func (wf *HashFile) CountHashes() (hashes int64)

func (*HashFile) ReadHashAt added in v0.0.7

func (wf *HashFile) ReadHashAt(off int64) ([32]byte, error)

func (*HashFile) Sync added in v0.0.7

func (wf *HashFile) Sync() error

func (*HashFile) WriteHashAt added in v0.0.7

func (wf *HashFile) WriteHashAt(val [32]byte, off int64) error

type MemShadowedWordFile added in v0.0.12

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

func NewMemShadowedWordFile added in v0.0.12

func NewMemShadowedWordFile(file memfile.AppendableLookupFile, wordSize int64, wordCount int64) (*MemShadowedWordFile, error)

func (*MemShadowedWordFile) Close added in v0.0.12

func (wf *MemShadowedWordFile) Close() error

func (*MemShadowedWordFile) CountWords added in v0.0.12

func (wf *MemShadowedWordFile) CountWords() (words int64, err error)

func (*MemShadowedWordFile) ReadWordAt added in v0.0.12

func (wf *MemShadowedWordFile) ReadWordAt(off int64) (int64, error)

func (*MemShadowedWordFile) Sync added in v0.0.12

func (wf *MemShadowedWordFile) Sync() error

func (*MemShadowedWordFile) WordSize added in v0.0.12

func (wf *MemShadowedWordFile) WordSize() int64

func (*MemShadowedWordFile) WriteWordAt added in v0.0.12

func (wf *MemShadowedWordFile) WriteWordAt(val int64, off int64) error

type ReadAtWordCounter

type ReadAtWordCounter interface {
	ReaderAtWord
	WordCounter
	WordSize() int64
}

type ReadWriteAtWordCounter

type ReadWriteAtWordCounter interface {
	ReaderAtWord
	WriterAtWord
	WordCounter
	Sync() error
	WordSize() int64
}

type ReaderAtWord

type ReaderAtWord interface {
	io.Closer
	ReadWordAt(off int64) (int64, error)
}

type WordCounter

type WordCounter interface {
	CountWords() (int64, error)
}

type WordFile

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

func NewWordFile

func NewWordFile(file memfile.AppendableLookupFile, wordSize int64, wordCount int64) *WordFile

func (*WordFile) Close

func (wf *WordFile) Close() error

func (*WordFile) CountWords

func (wf *WordFile) CountWords() (words int64, err error)

func (*WordFile) ReadWordAt

func (wf *WordFile) ReadWordAt(off int64) (int64, error)

func (*WordFile) Sync

func (wf *WordFile) Sync() error

func (*WordFile) WordSize added in v0.0.7

func (wf *WordFile) WordSize() int64

func (*WordFile) WriteWordAt

func (wf *WordFile) WriteWordAt(val int64, off int64) error

type WordFileCreator

type WordFileCreator interface {
	WordFileExists() bool
	CreateWordFile() error
	OpenWordFile() (ReadWriteAtWordCounter, error)
	OpenWordFileReadOnly() (ReadAtWordCounter, error)
	CreateWordFileFilledZeros(count int64) error
}

type WriterAtWord

type WriterAtWord interface {
	io.Closer
	WriteWordAt(val int64, off int64) error
}

Jump to

Keyboard shortcuts

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