86 lines
3.3 KiB
HTML
86 lines
3.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PCRE2_SERIALIZE_DECODE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PCRE2_SERIALIZE_DECODE</H1>
|
|
Section: C Library Functions (3)<BR>Updated: 27 June 2018<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
PCRE2 - Perl-compatible regular expressions (revised API)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
<P>
|
|
<B>#include <<A HREF="file:///usr/include/pcre2.h">pcre2.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<PRE>
|
|
<B>int32_t pcre2_serialize_decode(pcre2_code **</B><I>codes</I>,
|
|
<B> int32_t </B><I>number_of_codes</I>, const uint8_t *<I>bytes</I>,
|
|
<B> pcre2_general_context *</B><I>gcontext</I>);
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
This function decodes a serialized set of compiled patterns back into a list of
|
|
individual patterns. This is possible only on a host that is running the same
|
|
version of PCRE2, with the same code unit width, and the host must also have
|
|
the same endianness, pointer width and PCRE2_SIZE type. The arguments for
|
|
<B>pcre2_serialize_decode()</B> are:
|
|
<P>
|
|
<BR> <I>codes</I> pointer to a vector in which to build the list
|
|
<BR> <I>number_of_codes</I> number of slots in the vector
|
|
<BR> <I>bytes</I> the serialized byte stream
|
|
<BR> <I>gcontext</I> pointer to a general context or NULL
|
|
<P>
|
|
The <I>bytes</I> argument must point to a block of data that was originally
|
|
created by <B>pcre2_serialize_encode()</B>, though it may have been saved on
|
|
disc or elsewhere in the meantime. If there are more codes in the serialized
|
|
data than slots in the list, only those compiled patterns that will fit are
|
|
decoded. The yield of the function is the number of decoded patterns, or one of
|
|
the following negative error codes:
|
|
<P>
|
|
<BR> PCRE2_ERROR_BADDATA <I>number_of_codes</I> is zero or less
|
|
<BR> PCRE2_ERROR_BADMAGIC mismatch of id bytes in <I>bytes</I>
|
|
<BR> PCRE2_ERROR_BADMODE mismatch of variable unit size or PCRE version
|
|
<BR> PCRE2_ERROR_MEMORY memory allocation failed
|
|
<BR> PCRE2_ERROR_NULL <I>codes</I> or <I>bytes</I> is NULL
|
|
<P>
|
|
PCRE2_ERROR_BADMAGIC may mean that the data is corrupt, or that it was compiled
|
|
on a system with different endianness.
|
|
<P>
|
|
|
|
There is a complete description of the PCRE2 native API in the
|
|
|
|
<B>pcre2api</B>
|
|
|
|
page and a description of the serialization functions in the
|
|
|
|
<B>pcre2serialize</B>
|
|
|
|
page.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:50 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|