我要评分
获取效率
正确性
完整性
易理解

Serialize

API Definition

int Serialize(uint8_t *&dataPtr, size_t &dataLength) const;

Function

Store the searcher content into the uint8 array with a length of dataLength bytes and a start address of dataPtr.

Parameters

Parameter

Description

Data Type

Value Range

dataPtr

Start address of the array that stores the content of the searcher.

uint8_t *&

The value can only be a null pointer.

dataLength

Length of the array that stores the content of the searcher.

size_t &

The value can only be 0.

Return Value

Data Type

Description

int

If the parameter value exceeds the value range, -1 is returned. If this API is called after BuildSearcher or Load/Deserialize/LoadGraph is called, -1 is returned. Otherwise, 0 is returned.