# Functions
AssertTrue asserts that b is true.
AssertTruef is AssertTrue with extra info.
BloomBitsPerKey returns the bits per key required by bloomfilter based on the false positive rate.
BytesToU32 converts the given byte slice to uint32.
BytesToU32Slice converts the given byte slice to uint32 slice.
BytesToU64 converts the given byte slice to uint64.
BytesToU64Slice converts the given byte slice to uint64 slice.
CalculateChecksum calculates checksum for data using ct checksum type.
Check logs fatal if err != nil.
Check2 acts as convenience wrapper around Check, using the 2nd argument as error.
CompareKeys checks the key without timestamp and checks the timestamp if keyNoTs is same.
Copy copies a byte slice and returns the copied slice.
CreateSyncedFile creates a new file (using O_EXCL), errors if it already existed.
FixedDuration returns a string representation of the given duration with the hours, minutes, and seconds.
GenerateIV generates IV.
hash implements a hashing algorithm similar to the Murmur hash.
IBytesToString converts size in bytes to human readable format.
KeyWithTs generates a new key by appending ts to key.
No description provided by the author
No description provided by the author
NewFilter returns a new Bloom filter that encodes a set of []byte keys with the given number of bits per key, approximately.
No description provided by the author
NewPageBuffer returns a new PageBuffer with first page having size pageSize.
No description provided by the author
NewThrottle creates a new throttle with a max number of workers.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OpenExistingFile opens an existing file, errors if it doesn't exist.
OpenSyncedFile creates the file if one doesn't exist.
OpenTruncFile opens the file with O_RDWR | O_CREATE | O_TRUNC.
ParseKey parses the actual key from the key bytes.
ParseTs parses the timestamp from the key bytes.
No description provided by the author
SafeCopy does append(a[:0], src...).
SameKey checks for key equality ignoring the version timestamp suffix.
U32SliceToBytes converts the given Uint32 slice to byte slice.
U32ToBytes converts the given Uint32 to bytes.
U64SliceToBytes converts the given Uint64 slice to byte slice.
U64ToBytes converts the given Uint64 to bytes.
VerifyChecksum validates the checksum for the data against the given expected checksum.
No description provided by the author
No description provided by the author
Wrap wraps errors from external lib.
Wrapf is Wrap with extra info.
XORBlock encrypts the given data with AES and XOR's with IV.
No description provided by the author
No description provided by the author
ZSTDCompress compresses a block using ZSTD algorithm.
ZSTDCompressBound returns the worst case size needed for a destination buffer.
ZSTDDecompress decompresses a block using ZSTD algorithm.
# Variables
CastagnoliCrcTable is a CRC32 polynomial table.
ErrChecksumMismatch is returned at checksum mismatch.
ErrCommitAfterFinish indicates that write batch commit was called after finish.
ErrEOF indicates an end of file when trying to read from a memory mapped file and encountering the end of slice.
No description provided by the author
# Structs
PageBuffer consists of many pages.
PageBufferReader is a reader for PageBuffer.
No description provided by the author
Slice holds a reusable buf, will reallocate if you request a larger size than ever before.
Throttle allows a limited number of workers to run at a time.
ValueStruct represents the value info that can be associated with a key, but also the internal Meta field.
WaterMark is used to keep track of the minimum un-finished index.
# Interfaces
Iterator is an interface for a basic iterator.