Function hyperscan_sys::hs_expand_stream
source · [−]pub unsafe extern "C" fn hs_expand_stream(
db: *const hs_database_t,
stream: *mut *mut hs_stream_t,
buf: *const c_char,
buf_size: usize
) -> hs_error_t
Expand description
Decompresses a compressed representation created by @ref hs_compress_stream() into a new stream.
Note: @p buf must correspond to a complete compressed representation created by @ref hs_compress_stream() of a stream that was opened against @p db. It is not always possible to detect misuse of this API and behaviour is undefined if these properties are not satisfied.
@param db The compiled pattern database that the compressed stream was opened against.
@param stream On success, a pointer to the expanded @ref hs_stream_t will be returned; NULL on failure.
@param buf A compressed representation of a stream. These compressed forms are created by @ref hs_compress_stream().
@param buf_size The size in bytes of the compressed representation.
@return @ref HS_SUCCESS on success, other values on failure.