pub unsafe extern "C" fn hs_serialized_database_size(
    bytes: *const c_char,
    length: usize,
    deserialized_size: *mut usize
) -> hs_error_t
Expand description

Utility function for reporting the size that would be required by a database if it were deserialized.

This can be used to allocate a shared memory region or other “special” allocation prior to deserializing with the @ref hs_deserialize_database_at() function.

@param bytes Pointer to a byte array generated by @ref hs_serialize_database() representing a compiled pattern database.

@param length The length of the byte array generated by @ref hs_serialize_database(). This should be the same value as that returned by @ref hs_serialize_database().

@param deserialized_size On success, the size of the compiled database that would be generated by @ref hs_deserialize_database_at() is returned here.

@return @ref HS_SUCCESS on success, other values on failure.