Base interface for classes that provide a binary representation of index values for a BlockIndex.
interface
|
IBlockIndexFormat
|
with
|
<T>
|
Frequently
used
block
index
nodes
are
kept
in
memory,
where
values
are
stored
as
TValue
values.
Block
index
nodes
are
serialized
to
the
underlying
persistent
store
using
the
ValueRead
and
ValueWrite
method.
Returns the number of bytes used to encode a value.
property
|
ValueBytes
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of bytes per value. |
Reads a single value from the given stream.
method
|
ValueRead
(IDataStream stream)
|
||
type
|
T
|
||
params
|
stream
|
[not-null]
|
The data stream. |
returns
|
The read value. |
Remarks:
The method is expected to read exactly ValueBytes from the stream.
Writes a single value to the given stream.
method
|
ValueWrite
(IDataStream stream,
T value)
|
||
params
|
stream
|
[not-null]
|
The data stream. |
value
|
The value to write. |
Remarks:
The method is expected to write exactly ValueBytes to the stream.