1PCRE2_SERIALIZE_DECODE(3)  Library Functions Manual  PCRE2_SERIALIZE_DECODE(3)
2
3
4

NAME

6       PCRE2 - Perl-compatible regular expressions (revised API)
7

SYNOPSIS

9
10       #include <pcre2.h>
11
12       int32_t pcre2_serialize_decode(pcre2_code **codes,
13         int32_t number_of_codes, const uint8_t *bytes,
14         pcre2_general_context *gcontext);
15

DESCRIPTION

17
18       This function decodes a serialized set of compiled patterns back into a
19       list of individual patterns. Its arguments are:
20
21         codes            pointer to a vector in which to build the list
22         number_of_codes  number of slots in the vector
23         bytes            the serialized byte stream
24         gcontext         pointer to a general context or NULL
25
26       The bytes argument must point to a block of data  that  was  originally
27       created  by  pcre2_serialize_encode(), though it may have been saved on
28       disc or elsewhere in the meantime. If there are more codes in the seri‐
29       alized  data  than slots in the list, only those compiled patterns that
30       will fit are decoded. The yield  of  the  function  is  the  number  of
31       decoded patterns, or one of the following negative error codes:
32
33         PCRE2_ERROR_BADDATA   number_of_codes is zero or less
34         PCRE2_ERROR_BADMAGIC  mismatch of id bytes in bytes
35         PCRE2_ERROR_BADMODE   mismatch of variable unit size or PCRE version
36         PCRE2_ERROR_MEMORY    memory allocation failed
37         PCRE2_ERROR_NULL      codes or bytes is NULL
38
39       PCRE2_ERROR_BADMAGIC  may mean that the data is corrupt, or that it was
40       compiled on a system with different endianness.
41
42       There is a complete description of the PCRE2 native API in the pcre2api
43       page and a description of the POSIX API in the pcre2posix page.
44
45
46
47PCRE2 10.21                    02 September 2015     PCRE2_SERIALIZE_DECODE(3)
Impressum