GenericEncodedNodeTKey, TValueEncodeRecord Method

Encodes a key-value record into a binary stream.

Definition

Namespace: SnapDB.Snap.Tree
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
protected int EncodeRecord(
	byte* stream,
	TKey prevKey,
	TValue prevValue,
	TKey currentKey,
	TValue currentValue
)

Parameters

stream  Byte*
A pointer to the binary stream where the record will be encoded.
prevKey  TKey
The previous key in the sequence.
prevValue  TValue
The previous value in the sequence.
currentKey  TKey
The current key to be encoded.
currentValue  TValue
The current value to be encoded.

Return Value

Int32
The number of bytes written to the binary stream as a result of the encoding.

Remarks

This method encodes a key-value record into the specified binary stream using the configured encoding method. It takes the previous key and value as well as the current key and value, which can be used for delta encoding. The method returns the number of bytes written to the stream during encoding.

See Also