mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
add dynamic compression to the public api
This commit is contained in:
parent
e099d85524
commit
d878e8cdf3
@ -356,8 +356,8 @@ hs_error_t HS_CDECL hs_reset_and_copy_stream(hs_stream_t *to_id,
|
||||
* @ref HS_SUCCESS on success, @ref HS_INSUFFICIENT_SPACE if the provided
|
||||
* buffer is too small.
|
||||
*/
|
||||
hs_error_t hs_compress_stream(const hs_stream_t *stream, char *buf,
|
||||
size_t buf_space, size_t *used_space);
|
||||
hs_error_t HS_CDECL hs_compress_stream(const hs_stream_t *stream, char *buf,
|
||||
size_t buf_space, size_t *used_space);
|
||||
|
||||
/**
|
||||
* Decompresses a compressed representation created by @ref hs_compress_stream()
|
||||
@ -386,8 +386,9 @@ hs_error_t hs_compress_stream(const hs_stream_t *stream, char *buf,
|
||||
* @return
|
||||
* @ref HS_SUCCESS on success, other values on failure.
|
||||
*/
|
||||
hs_error_t hs_expand_stream(const hs_database_t *db, hs_stream_t **stream,
|
||||
const char *buf, size_t buf_size);
|
||||
hs_error_t HS_CDECL hs_expand_stream(const hs_database_t *db,
|
||||
hs_stream_t **stream, const char *buf,
|
||||
size_t buf_size);
|
||||
|
||||
/**
|
||||
* Decompresses a compressed representation created by @ref hs_compress_stream()
|
||||
@ -428,11 +429,11 @@ hs_error_t hs_expand_stream(const hs_database_t *db, hs_stream_t **stream,
|
||||
* @return
|
||||
* @ref HS_SUCCESS on success, other values on failure.
|
||||
*/
|
||||
hs_error_t hs_reset_and_expand_stream(hs_stream_t *to_stream,
|
||||
const char *buf, size_t buf_size,
|
||||
hs_scratch_t *scratch,
|
||||
match_event_handler onEvent,
|
||||
void *context);
|
||||
hs_error_t HS_CDECL hs_reset_and_expand_stream(hs_stream_t *to_stream,
|
||||
const char *buf, size_t buf_size,
|
||||
hs_scratch_t *scratch,
|
||||
match_event_handler onEvent,
|
||||
void *context);
|
||||
|
||||
/**
|
||||
* The block (non-streaming) regular expression scanner.
|
||||
|
@ -1121,6 +1121,7 @@ hs_error_t hs_compress_stream(const hs_stream_t *stream, char *buf,
|
||||
return HS_SUCCESS;
|
||||
}
|
||||
|
||||
HS_PUBLIC_API
|
||||
hs_error_t hs_expand_stream(const hs_database_t *db, hs_stream_t **stream,
|
||||
const char *buf, size_t buf_size) {
|
||||
if (unlikely(!stream || !buf)) {
|
||||
@ -1159,6 +1160,7 @@ hs_error_t hs_expand_stream(const hs_database_t *db, hs_stream_t **stream,
|
||||
return HS_SUCCESS;
|
||||
}
|
||||
|
||||
HS_PUBLIC_API
|
||||
hs_error_t hs_reset_and_expand_stream(hs_stream_t *to_stream,
|
||||
const char *buf, size_t buf_size,
|
||||
hs_scratch_t *scratch,
|
||||
|
Loading…
x
Reference in New Issue
Block a user