Crate hyperscan_sys
source · [−]Expand description
Hyperscan is a software regular expression matching engine designed with high performance and flexibility in mind.
Modules
Chimera is a software regular expression matching engine that is a hybrid of Hyperscan and PCRE.
Structs
A type containing error details that is returned by the compile calls (@ref
hs_compile(), @ref hs_compile_multi() and @ref hs_compile_ext_multi()) on
failure. The caller may inspect the values returned in this type to
determine the cause of failure.
A structure containing additional parameters related to an expression,
passed in at build time to @ref hs_compile_ext_multi() or @ref
hs_expression_ext_info.
A type containing information related to an expression that is returned by
@ref hs_expression_info() or @ref hs_expression_ext_info.
A type containing information on the target platform which may optionally be
provided to the compile calls (@ref hs_compile(), @ref hs_compile_multi(),
@ref hs_compile_ext_multi()).
Definition of the stream identifier type.
Constants
Functions
Allocate a “scratch” space for use by Hyperscan.
Allocate a scratch space that is a clone of an existing scratch space.
Close a stream.
The basic regular expression compiler.
The multiple regular expression compiler with extended parameter support.
The basic pure literal expression compiler.
The multiple pure literal expression compiler.
The multiple regular expression compiler.
Creates a compressed representation of the provided stream in the buffer
provided. This compressed representation can be converted back into a stream
state by using @ref hs_expand_stream() or @ref hs_reset_and_expand_stream().
The size of the compressed representation will be placed into @p used_space.
Duplicate the given stream. The new stream will have the same state as the
original including the current stream offset.
Utility function providing information about a database.
Provides the size of the given database in bytes.
Reconstruct a pattern database from a stream of bytes previously generated
by @ref hs_serialize_database().
Reconstruct a pattern database from a stream of bytes previously generated
by @ref hs_serialize_database() at a given memory location.
Decompresses a compressed representation created by @ref hs_compress_stream()
into a new stream.
Utility function providing information about a regular expression, with
extended parameter support. The information provided in @ref hs_expr_info_t
includes the minimum and maximum width of a pattern match.
Utility function providing information about a regular expression. The
information provided in @ref hs_expr_info_t includes the minimum and maximum
width of a pattern match.
Free an error structure generated by @ref hs_compile(), @ref
hs_compile_multi() or @ref hs_compile_ext_multi().
Free a compiled pattern database.
Free a scratch block previously allocated by @ref hs_alloc_scratch() or @ref
hs_clone_scratch().
Open and initialise a stream.
Populates the platform information based on the current host.
Duplicate the given ‘from’ stream state onto the ‘to’ stream. The ‘to’ stream
will first be reset (reporting any EOD matches if a non-NULL @p onEvent
callback handler is provided).
Decompresses a compressed representation created by @ref hs_compress_stream()
on top of the ‘to’ stream. The ‘to’ stream will first be reset (reporting
any EOD matches if a non-NULL @p onEvent callback handler is provided).
Reset a stream to an initial state.
Write data to be scanned to the opened stream.
The vectored regular expression scanner.
Provides the size of the given scratch space.
Serialize a pattern database to a stream of bytes.
Utility function providing information about a serialized database.
Utility function for reporting the size that would be required by a
database if it were deserialized.
Set the allocate and free functions used by Hyperscan for allocating
memory at runtime for stream state, scratch space, database bytecode,
and various other data structure returned by the Hyperscan API.
Set the allocate and free functions used by Hyperscan for allocating memory
for database bytecode produced by the compile calls (@ref hs_compile(), @ref
hs_compile_multi(), @ref hs_compile_ext_multi()) and by database
deserialization (@ref hs_deserialize_database()).
Set the allocate and free functions used by Hyperscan for allocating memory
for items returned by the Hyperscan API such as @ref hs_compile_error_t, @ref
hs_expr_info_t and serialized databases.
Set the allocate and free functions used by Hyperscan for allocating memory
for scratch space by @ref hs_alloc_scratch() and @ref hs_clone_scratch().
Set the allocate and free functions used by Hyperscan for allocating memory
for stream state by @ref hs_open_stream().
Provides the size of the stream state allocated by a single stream opened
against the given database.
Utility function to test the current system architecture.
Utility function for identifying this release version.
Type Definitions
The type of the callback function that will be used by Hyperscan to allocate
more memory at runtime as required, for example in @ref hs_open_stream() to
allocate stream state.
A type containing error details that is returned by the compile calls (@ref
hs_compile(), @ref hs_compile_multi() and @ref hs_compile_ext_multi()) on
failure. The caller may inspect the values returned in this type to
determine the cause of failure.
A Hyperscan pattern database.
A type for errors returned by Hyperscan functions.
A structure containing additional parameters related to an expression,
passed in at build time to @ref hs_compile_ext_multi() or @ref
hs_expression_ext_info.
A type containing information related to an expression that is returned by
@ref hs_expression_info() or @ref hs_expression_ext_info.
The type of the callback function that will be used by Hyperscan to free
memory regions previously allocated using the @ref hs_alloc_t function.
A type containing information on the target platform which may optionally be
provided to the compile calls (@ref hs_compile(), @ref hs_compile_multi(),
@ref hs_compile_ext_multi()).
A Hyperscan scratch space.
The stream identifier returned by @ref hs_open_stream().
Definition of the match event callback function type.