\hypertarget{group__compresssion__functions}{}\doxysection{Compression Functions}
\label{group__compresssion__functions}\index{Compression Functions@{Compression Functions}}


These functions work with compression and decompression.  


Collaboration diagram for Compression Functions\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group__compresssion__functions}
\end{center}
\end{figure}
\doxysubsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__compression__constants}{Compression Constants}}
\item 
\mbox{\hyperlink{group__compression__transformations}{Compression Stream Transformations}}
\begin{DoxyCompactList}\small\item\em The following \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} constants can be used with \mbox{\hyperlink{class_qore_1_1_transform_input_stream}{Transform\+Input\+Stream}} and \mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Transform\+Output\+Stream}} to transform stream data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_ga4a509ab986c4592aa8109cf3ec98fa8b}{Qore\+::bunzip2\+\_\+to\+\_\+binary}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin)
\begin{DoxyCompactList}\small\item\em Uncompresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the uncompressed data as a binary object. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_gabffa49d48df118495b29275a971fdfae}{Qore\+::bunzip2\+\_\+to\+\_\+binary}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__compresssion__functions_ga19da4b839f9348ab3c9932c961a318dc}{Qore\+::bunzip2\+\_\+to\+\_\+string}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Uncompresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the uncompressed data as a string. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_gad364182e70b4a748b22b7636f18521dd}{Qore\+::bunzip2\+\_\+to\+\_\+string}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_ga17fffc0db986403a295dcd86520c0ee5}{Qore\+::bzip2}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin, softint level=\mbox{\hyperlink{group__compression__constants_ga5b66f8813c20f89b4555c72244ae91a6}{B\+Z2\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}})
\begin{DoxyCompactList}\small\item\em Compresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the compressed data as a binary. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_gad4849e70c48c3c4ad8a58135decd3fbe}{Qore\+::bzip2}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, softint level=\mbox{\hyperlink{group__compression__constants_ga5b66f8813c20f89b4555c72244ae91a6}{B\+Z2\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}})
\begin{DoxyCompactList}\small\item\em Compresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the compressed data as a binary. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_ga2a5264cac8dfd0b95b4706f122c4a5cb}{Qore\+::bzip2}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_ga2a9f569fd6d7f90bb6d4e4d99b724105}{Qore\+::compress}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} level=\mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}})
\begin{DoxyCompactList}\small\item\em Performs zlib-\/based \char`\"{}deflate\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a binary object of the compressed data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_ga81268d3dc0361302f4b3f35e3990b581}{Qore\+::compress}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} level=\mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}})
\begin{DoxyCompactList}\small\item\em Performs zlib-\/based \char`\"{}deflate\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a binary object of the compressed data. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_ga5a7dd18fde0559da33f14f484656cad7}{Qore\+::compress}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_transform}{Transform}} \mbox{\hyperlink{group__compresssion__functions_gabdbd68fb7146a0fe2c5c4bb13d481cb8}{Qore\+::get\+\_\+compressor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} alg, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} level=\mbox{\hyperlink{group__compression__constants_gacba7ff553151bfe51acca63193990a0c}{C\+O\+M\+P\+R\+E\+S\+S\+I\+O\+N\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+F\+A\+U\+LT}})
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} object for compressing data using the given \mbox{\hyperlink{group__compression__transformations}{algorithm}} for use with \mbox{\hyperlink{class_qore_1_1_transform_input_stream}{Transform\+Input\+Stream}} and \mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Transform\+Output\+Stream}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_transform}{Transform}} \mbox{\hyperlink{group__compresssion__functions_ga1590535ac15c91dee832b9ffae8fa69f}{Qore\+::get\+\_\+decompressor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} alg)
\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} object for decompressing data using the given \mbox{\hyperlink{group__compression__transformations}{algorithm}} for use with \mbox{\hyperlink{class_qore_1_1_transform_input_stream}{Transform\+Input\+Stream}} and \mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Transform\+Output\+Stream}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_gae3d26c1886e243d300d5d7ca1686ba9e}{Qore\+::gunzip\+\_\+to\+\_\+binary}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin)
\begin{DoxyCompactList}\small\item\em Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based decompression of data compressed with the {\ttfamily \char`\"{}gzip\char`\"{}} algorithm (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a binary object of the uncompressed data. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_ga4a4dc4e883ee617bc05418daf884bca1}{Qore\+::gunzip\+\_\+to\+\_\+binary}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__compresssion__functions_ga5684efdbe38373331255d4984ef13c9d}{Qore\+::gunzip\+\_\+to\+\_\+string}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based decompression of data compressed with the \char`\"{}gzip\char`\"{} algorithm (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a string of the uncompressed datas. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_ga324723f7a61a79d2ec18b4c871c062bd}{Qore\+::gunzip\+\_\+to\+\_\+string}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_ga7e775cc2761ef5f265c1a131f4076eb5}{Qore\+::gzip}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} str, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} level=\mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}})
\begin{DoxyCompactList}\small\item\em Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based \char`\"{}gzip\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a binary object of the compressed data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_ga55081981dc37ac4a0ba9b03b8453b09b}{Qore\+::gzip}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} level=\mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}})
\begin{DoxyCompactList}\small\item\em Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based \char`\"{}gzip\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a binary object of the compressed data. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_gaed906422dda7f7506aaaa4d847f8eaed}{Qore\+::gzip}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__compresssion__functions_gad1fe94d17de0489667c6909b88c01d43}{Qore\+::uncompress\+\_\+to\+\_\+binary}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin)
\begin{DoxyCompactList}\small\item\em Performs zlib-\/based decompression of data compressed by the \char`\"{}deflate\char`\"{} algorithm (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a binary object of the decompressed data. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_gafecce0baf872032249897916a592d18c}{Qore\+::uncompress\+\_\+to\+\_\+binary}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__compresssion__functions_ga873701e40ef6eb9831c9cf66fc8cd981}{Qore\+::uncompress\+\_\+to\+\_\+string}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} bin, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Performs zlib-\/based decompression of data compressed by the \char`\"{}deflate\char`\"{} algorithm (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a string of the decompressed data. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__compresssion__functions_ga9dedfc30ebd57865cd2ee272612c2efd}{Qore\+::uncompress\+\_\+to\+\_\+string}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
These functions work with compression and decompression. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__compresssion__functions_gabffa49d48df118495b29275a971fdfae}\label{group__compresssion__functions_gabffa49d48df118495b29275a971fdfae}} 
\index{Compression Functions@{Compression Functions}!bunzip2\_to\_binary@{bunzip2\_to\_binary}}
\index{bunzip2\_to\_binary@{bunzip2\_to\_binary}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{bunzip2\_to\_binary()}{bunzip2\_to\_binary()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::bunzip2\+\_\+to\+\_\+binary (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_ga4a509ab986c4592aa8109cf3ec98fa8b}\label{group__compresssion__functions_ga4a509ab986c4592aa8109cf3ec98fa8b}} 
\index{Compression Functions@{Compression Functions}!bunzip2\_to\_binary@{bunzip2\_to\_binary}}
\index{bunzip2\_to\_binary@{bunzip2\_to\_binary}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{bunzip2\_to\_binary()}{bunzip2\_to\_binary()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::bunzip2\+\_\+to\+\_\+binary (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin }\end{DoxyParamCaption})}



Uncompresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the uncompressed data as a binary object. 


\begin{DoxyParams}{Parameters}
{\em bin} & the compressed data to decompress\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the uncompressed data as a binary object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = \mbox{\hyperlink{group__compresssion__functions_ga4a509ab986c4592aa8109cf3ec98fa8b}{bunzip2\_to\_binary}}(bzip2\_string);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em B\+Z\+I\+P2-\/\+D\+E\+C\+O\+M\+P\+R\+E\+S\+S-\/\+E\+R\+R\+OR} & the bzip2 library returned an internal error during processing (possibly due to corrupt input data) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_gad364182e70b4a748b22b7636f18521dd}\label{group__compresssion__functions_gad364182e70b4a748b22b7636f18521dd}} 
\index{Compression Functions@{Compression Functions}!bunzip2\_to\_string@{bunzip2\_to\_string}}
\index{bunzip2\_to\_string@{bunzip2\_to\_string}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{bunzip2\_to\_string()}{bunzip2\_to\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::bunzip2\+\_\+to\+\_\+string (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_ga19da4b839f9348ab3c9932c961a318dc}\label{group__compresssion__functions_ga19da4b839f9348ab3c9932c961a318dc}} 
\index{Compression Functions@{Compression Functions}!bunzip2\_to\_string@{bunzip2\_to\_string}}
\index{bunzip2\_to\_string@{bunzip2\_to\_string}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{bunzip2\_to\_string()}{bunzip2\_to\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::bunzip2\+\_\+to\+\_\+string (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Uncompresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the uncompressed data as a string. 


\begin{DoxyParams}{Parameters}
{\em bin} & the compressed data to decompress \\
\hline
{\em encoding} & the character encoding tag for the string return value; if not present, the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} is assumed.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the uncompressed data as a string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string str = \mbox{\hyperlink{group__compresssion__functions_ga19da4b839f9348ab3c9932c961a318dc}{bunzip2\_to\_string}}(bzip2\_string, \textcolor{stringliteral}{"iso-\/8859-\/1"});}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em B\+Z\+I\+P2-\/\+D\+E\+C\+O\+M\+P\+R\+E\+S\+S-\/\+E\+R\+R\+OR} & the bzip2 library returned an internal error during processing (possibly due to corrupt input data) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_ga2a5264cac8dfd0b95b4706f122c4a5cb}\label{group__compresssion__functions_ga2a5264cac8dfd0b95b4706f122c4a5cb}} 
\index{Compression Functions@{Compression Functions}!bzip2@{bzip2}}
\index{bzip2@{bzip2}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{bzip2()}{bzip2()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily nothing Qore\+::bzip2 (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_ga17fffc0db986403a295dcd86520c0ee5}\label{group__compresssion__functions_ga17fffc0db986403a295dcd86520c0ee5}} 
\index{Compression Functions@{Compression Functions}!bzip2@{bzip2}}
\index{bzip2@{bzip2}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{bzip2()}{bzip2()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::bzip2 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin,  }\item[{softint}]{level = {\ttfamily \mbox{\hyperlink{group__compression__constants_ga5b66f8813c20f89b4555c72244ae91a6}{B\+Z2\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}}} }\end{DoxyParamCaption})}



Compresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the compressed data as a binary. 


\begin{DoxyParams}{Parameters}
{\em bin} & the data to compress \\
\hline
{\em level} & the compression level, must be a value between 1 and 9 inclusive, 1 = the least compression (and taking the least memory), 9 = the most compression (using the most memory). An invalid option passed to this argument will result in a {\ttfamily B\+Z\+L\+I\+B2-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} exception being raised.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the compressed data as a binary object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = \mbox{\hyperlink{group__compresssion__functions_ga17fffc0db986403a295dcd86520c0ee5}{bzip2}}(data);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em B\+Z\+L\+I\+B2-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} & level must be between 1 -\/ 9 \\
\hline
{\em B\+Z\+I\+P2-\/\+C\+O\+M\+P\+R\+E\+S\+S-\/\+E\+R\+R\+OR} & the bzip2 library returned an error during processing \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_gad4849e70c48c3c4ad8a58135decd3fbe}\label{group__compresssion__functions_gad4849e70c48c3c4ad8a58135decd3fbe}} 
\index{Compression Functions@{Compression Functions}!bzip2@{bzip2}}
\index{bzip2@{bzip2}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{bzip2()}{bzip2()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::bzip2 (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{softint}]{level = {\ttfamily \mbox{\hyperlink{group__compression__constants_ga5b66f8813c20f89b4555c72244ae91a6}{B\+Z2\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}}} }\end{DoxyParamCaption})}



Compresses the given data with the \href{http://en.wikipedia.org/wiki/Bzip2}{\texttt{ bzip2 algorithm}} and returns the compressed data as a binary. 

Strings are compressed without the trailing null character


\begin{DoxyParams}{Parameters}
{\em str} & the data to compress \\
\hline
{\em level} & the compression level, must be a value between 1 and 9 inclusive, 1 = the least compression (and taking the least memory), 9 = the most compression (using the most memory). An invalid option passed to this argument will result in a {\ttfamily B\+Z\+L\+I\+B2-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} exception being raised.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the compressed data as a binary object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = \mbox{\hyperlink{group__compresssion__functions_ga17fffc0db986403a295dcd86520c0ee5}{bzip2}}(str);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em B\+Z\+L\+I\+B2-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} & level must be between 1 -\/ 9 \\
\hline
{\em B\+Z\+I\+P2-\/\+C\+O\+M\+P\+R\+E\+S\+S-\/\+E\+R\+R\+OR} & the bzip2 library returned an error during processing \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_ga5a7dd18fde0559da33f14f484656cad7}\label{group__compresssion__functions_ga5a7dd18fde0559da33f14f484656cad7}} 
\index{Compression Functions@{Compression Functions}!compress@{compress}}
\index{compress@{compress}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{compress()}{compress()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily nothing Qore\+::compress (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_ga81268d3dc0361302f4b3f35e3990b581}\label{group__compresssion__functions_ga81268d3dc0361302f4b3f35e3990b581}} 
\index{Compression Functions@{Compression Functions}!compress@{compress}}
\index{compress@{compress}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{compress()}{compress()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::compress (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{level = {\ttfamily \mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}}} }\end{DoxyParamCaption})}



Performs zlib-\/based \char`\"{}deflate\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a binary object of the compressed data. 

Note that strings are compressed without the trailing null character.


\begin{DoxyParams}{Parameters}
{\em bin} & The binary object to compress \\
\hline
{\em level} & Specifies the compression level; must be an integer between 1 and 9, 9 meaning the highest compression level. The default value Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON gives a tradeoff between speed and compression size\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a binary object of the compressed data
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = \mbox{\hyperlink{group__compresssion__functions_ga2a9f569fd6d7f90bb6d4e4d99b724105}{compress}}(bin\_data);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} & level must be between 1 -\/ 9 or -\/1 \\
\hline
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & zlib returned an error while processing \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_ga2a9f569fd6d7f90bb6d4e4d99b724105}\label{group__compresssion__functions_ga2a9f569fd6d7f90bb6d4e4d99b724105}} 
\index{Compression Functions@{Compression Functions}!compress@{compress}}
\index{compress@{compress}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{compress()}{compress()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::compress (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{level = {\ttfamily \mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}}} }\end{DoxyParamCaption})}



Performs zlib-\/based \char`\"{}deflate\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a binary object of the compressed data. 

Note that strings are compressed without the trailing null character.


\begin{DoxyParams}{Parameters}
{\em str} & The string to compress \\
\hline
{\em level} & Specifies the compression level; must be an integer between 1 and 9, 9 meaning the highest compression level. The default value Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON gives a tradeoff between speed and compression size\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a binary object of the compressed data
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = \mbox{\hyperlink{group__compresssion__functions_ga2a9f569fd6d7f90bb6d4e4d99b724105}{compress}}(str\_data);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} & level must be between 1 -\/ 9 or -\/1 \\
\hline
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & zlib returned an error while processing \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_gabdbd68fb7146a0fe2c5c4bb13d481cb8}\label{group__compresssion__functions_gabdbd68fb7146a0fe2c5c4bb13d481cb8}} 
\index{Compression Functions@{Compression Functions}!get\_compressor@{get\_compressor}}
\index{get\_compressor@{get\_compressor}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{get\_compressor()}{get\_compressor()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} Qore\+::get\+\_\+compressor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{alg,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{level = {\ttfamily \mbox{\hyperlink{group__compression__constants_gacba7ff553151bfe51acca63193990a0c}{C\+O\+M\+P\+R\+E\+S\+S\+I\+O\+N\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+F\+A\+U\+LT}}} }\end{DoxyParamCaption})}



Returns a \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} object for compressing data using the given \mbox{\hyperlink{group__compression__transformations}{algorithm}} for use with \mbox{\hyperlink{class_qore_1_1_transform_input_stream}{Transform\+Input\+Stream}} and \mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Transform\+Output\+Stream}}. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{class_qore_1_1_file_output_stream}{Qore::FileOutputStream}} of(\textcolor{stringliteral}{"my-\/file.txt.bz2"});}
\DoxyCodeLine{\mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Qore::TransformOutputStream}} ts(of, \mbox{\hyperlink{group__compresssion__functions_gabdbd68fb7146a0fe2c5c4bb13d481cb8}{get\_compressor}}(\mbox{\hyperlink{group__compression__transformations_ga80882b4cc21a464faa9fcb8ff324503e}{Qore::COMPRESSION\_ALG\_BZIP2}}));}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em alg} & the transformation algorithm; see \mbox{\hyperlink{group__compression__transformations}{Compression Stream Transformations}} for possible values \\
\hline
{\em level} & compression level as defined by the algorithm or \mbox{\hyperlink{group__compression__constants_gacba7ff553151bfe51acca63193990a0c}{C\+O\+M\+P\+R\+E\+S\+S\+I\+O\+N\+\_\+\+L\+E\+V\+E\+L\+\_\+\+D\+E\+F\+A\+U\+LT}} to use the default compression level\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} object for compressing data using the given \mbox{\hyperlink{group__compression__transformations}{algorithm}} for use with \mbox{\hyperlink{class_qore_1_1_transform_input_stream}{Transform\+Input\+Stream}} and \mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Transform\+Output\+Stream}}
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__compresssion__functions_ga1590535ac15c91dee832b9ffae8fa69f}{Qore\+::get\+\_\+decompressor()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{group__compresssion__functions_ga1590535ac15c91dee832b9ffae8fa69f}\label{group__compresssion__functions_ga1590535ac15c91dee832b9ffae8fa69f}} 
\index{Compression Functions@{Compression Functions}!get\_decompressor@{get\_decompressor}}
\index{get\_decompressor@{get\_decompressor}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{get\_decompressor()}{get\_decompressor()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} Qore\+::get\+\_\+decompressor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{alg }\end{DoxyParamCaption})}



Returns a \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} object for decompressing data using the given \mbox{\hyperlink{group__compression__transformations}{algorithm}} for use with \mbox{\hyperlink{class_qore_1_1_transform_input_stream}{Transform\+Input\+Stream}} and \mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Transform\+Output\+Stream}}. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{class_qore_1_1_file_output_stream}{Qore::FileOutputStream}} of(\textcolor{stringliteral}{"my-\/file.txt.bz2"});}
\DoxyCodeLine{\mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Qore::TransformOutputStream}} ts(of, \mbox{\hyperlink{group__compresssion__functions_ga1590535ac15c91dee832b9ffae8fa69f}{get\_decompressor}}(\mbox{\hyperlink{group__compression__transformations_ga80882b4cc21a464faa9fcb8ff324503e}{Qore::COMPRESSION\_ALG\_BZIP2}}));}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em alg} & the transformation algorithm; see \mbox{\hyperlink{group__compression__transformations}{Compression Stream Transformations}} for possible values\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a \mbox{\hyperlink{class_qore_1_1_transform}{Transform}} object for decompressing data using the given \mbox{\hyperlink{group__compression__transformations}{algorithm}} for use with \mbox{\hyperlink{class_qore_1_1_transform_input_stream}{Transform\+Input\+Stream}} and \mbox{\hyperlink{class_qore_1_1_transform_output_stream}{Transform\+Output\+Stream}}
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__compresssion__functions_gabdbd68fb7146a0fe2c5c4bb13d481cb8}{Qore\+::get\+\_\+compressor()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{group__compresssion__functions_ga4a4dc4e883ee617bc05418daf884bca1}\label{group__compresssion__functions_ga4a4dc4e883ee617bc05418daf884bca1}} 
\index{Compression Functions@{Compression Functions}!gunzip\_to\_binary@{gunzip\_to\_binary}}
\index{gunzip\_to\_binary@{gunzip\_to\_binary}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{gunzip\_to\_binary()}{gunzip\_to\_binary()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::gunzip\+\_\+to\+\_\+binary (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_gae3d26c1886e243d300d5d7ca1686ba9e}\label{group__compresssion__functions_gae3d26c1886e243d300d5d7ca1686ba9e}} 
\index{Compression Functions@{Compression Functions}!gunzip\_to\_binary@{gunzip\_to\_binary}}
\index{gunzip\_to\_binary@{gunzip\_to\_binary}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{gunzip\_to\_binary()}{gunzip\_to\_binary()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::gunzip\+\_\+to\+\_\+binary (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin }\end{DoxyParamCaption})}



Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based decompression of data compressed with the {\ttfamily \char`\"{}gzip\char`\"{}} algorithm (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a binary object of the uncompressed data. 


\begin{DoxyParams}{Parameters}
{\em bin} & the compressed data to decompress\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the uncompressed data as a binary object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = \mbox{\hyperlink{group__compresssion__functions_gae3d26c1886e243d300d5d7ca1686ba9e}{gunzip\_to\_binary}}(data);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & The zlib library returned an error during processing (possibly due to corrupt input data) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_ga324723f7a61a79d2ec18b4c871c062bd}\label{group__compresssion__functions_ga324723f7a61a79d2ec18b4c871c062bd}} 
\index{Compression Functions@{Compression Functions}!gunzip\_to\_string@{gunzip\_to\_string}}
\index{gunzip\_to\_string@{gunzip\_to\_string}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{gunzip\_to\_string()}{gunzip\_to\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::gunzip\+\_\+to\+\_\+string (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_ga5684efdbe38373331255d4984ef13c9d}\label{group__compresssion__functions_ga5684efdbe38373331255d4984ef13c9d}} 
\index{Compression Functions@{Compression Functions}!gunzip\_to\_string@{gunzip\_to\_string}}
\index{gunzip\_to\_string@{gunzip\_to\_string}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{gunzip\_to\_string()}{gunzip\_to\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::gunzip\+\_\+to\+\_\+string (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based decompression of data compressed with the \char`\"{}gzip\char`\"{} algorithm (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a string of the uncompressed datas. 


\begin{DoxyParams}{Parameters}
{\em bin} & the compressed data to decompress \\
\hline
{\em encoding} & the character encoding tag for the string return value; if not present, the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} is assumed.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the uncompressed data as a string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string str = \mbox{\hyperlink{group__compresssion__functions_ga5684efdbe38373331255d4984ef13c9d}{gunzip\_to\_string}}(bin, \textcolor{stringliteral}{"iso-\/8859-\/1"});}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & The zlib library returned an error during processing (possibly due to corrupt input data) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_gaed906422dda7f7506aaaa4d847f8eaed}\label{group__compresssion__functions_gaed906422dda7f7506aaaa4d847f8eaed}} 
\index{Compression Functions@{Compression Functions}!gzip@{gzip}}
\index{gzip@{gzip}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{gzip()}{gzip()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily nothing Qore\+::gzip (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_ga55081981dc37ac4a0ba9b03b8453b09b}\label{group__compresssion__functions_ga55081981dc37ac4a0ba9b03b8453b09b}} 
\index{Compression Functions@{Compression Functions}!gzip@{gzip}}
\index{gzip@{gzip}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{gzip()}{gzip()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::gzip (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{level = {\ttfamily \mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}}} }\end{DoxyParamCaption})}



Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based \char`\"{}gzip\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a binary object of the compressed data. 


\begin{DoxyParams}{Parameters}
{\em bin} & the data to compress \\
\hline
{\em level} & the compression level, must be a value between 1 and 9 inclusive, 1 = the least compression (and taking the least memory), 9 = the most compression (using the most memory). An invalid option passed to this argument will result in a {\ttfamily Z\+L\+I\+B-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} exception being raised.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the compressed data as a binary object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary data = \mbox{\hyperlink{group__compresssion__functions_ga7e775cc2761ef5f265c1a131f4076eb5}{gzip}}(bin);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} & level must be between 1 -\/ 9 or -\/1 \\
\hline
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & The zlib library returned an error during processing (should not normally happen during compression) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_ga7e775cc2761ef5f265c1a131f4076eb5}\label{group__compresssion__functions_ga7e775cc2761ef5f265c1a131f4076eb5}} 
\index{Compression Functions@{Compression Functions}!gzip@{gzip}}
\index{gzip@{gzip}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{gzip()}{gzip()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::gzip (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{level = {\ttfamily \mbox{\hyperlink{group__compression__constants_gad0d06df5b25e4e03ca74b6458626d913}{Z\+\_\+\+D\+E\+F\+A\+U\+L\+T\+\_\+\+C\+O\+M\+P\+R\+E\+S\+S\+I\+ON}}} }\end{DoxyParamCaption})}



Performs \href{http://zlib.net/}{\texttt{ zlib}}-\/based \char`\"{}gzip\char`\"{} data compression (\href{http://www.ietf.org/rfc/rfc1952.txt}{\texttt{ R\+FC 1952}}) and returns a binary object of the compressed data. 

Strings are compressed without the trailing null character


\begin{DoxyParams}{Parameters}
{\em str} & the data to compress \\
\hline
{\em level} & the compression level, must be a value between 1 and 9 inclusive, 1 = the least compression (and taking the least memory), 9 = the most compression (using the most memory). An invalid option passed to this argument will result in a {\ttfamily Z\+L\+I\+B-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} exception being raised.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the compressed data as a binary object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary data = \mbox{\hyperlink{group__compresssion__functions_ga7e775cc2761ef5f265c1a131f4076eb5}{gzip}}(str);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+L\+E\+V\+E\+L-\/\+E\+R\+R\+OR} & level must be between 1 -\/ 9 or -\/1 \\
\hline
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & The zlib library returned an error during processing (should not normally happen during compression) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_gafecce0baf872032249897916a592d18c}\label{group__compresssion__functions_gafecce0baf872032249897916a592d18c}} 
\index{Compression Functions@{Compression Functions}!uncompress\_to\_binary@{uncompress\_to\_binary}}
\index{uncompress\_to\_binary@{uncompress\_to\_binary}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{uncompress\_to\_binary()}{uncompress\_to\_binary()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::uncompress\+\_\+to\+\_\+binary (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_gad1fe94d17de0489667c6909b88c01d43}\label{group__compresssion__functions_gad1fe94d17de0489667c6909b88c01d43}} 
\index{Compression Functions@{Compression Functions}!uncompress\_to\_binary@{uncompress\_to\_binary}}
\index{uncompress\_to\_binary@{uncompress\_to\_binary}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{uncompress\_to\_binary()}{uncompress\_to\_binary()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::uncompress\+\_\+to\+\_\+binary (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin }\end{DoxyParamCaption})}



Performs zlib-\/based decompression of data compressed by the \char`\"{}deflate\char`\"{} algorithm (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a binary object of the decompressed data. 


\begin{DoxyParams}{Parameters}
{\em bin} & the data to decompress\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a binary object of the decompressed data
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary bin = \mbox{\hyperlink{group__compresssion__functions_gad1fe94d17de0489667c6909b88c01d43}{uncompress\_to\_binary}}(data);}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & The zlib library returned an error during processing (possibly due to corrupt input data) \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__compresssion__functions_ga9dedfc30ebd57865cd2ee272612c2efd}\label{group__compresssion__functions_ga9dedfc30ebd57865cd2ee272612c2efd}} 
\index{Compression Functions@{Compression Functions}!uncompress\_to\_string@{uncompress\_to\_string}}
\index{uncompress\_to\_string@{uncompress\_to\_string}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{uncompress\_to\_string()}{uncompress\_to\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::uncompress\+\_\+to\+\_\+string (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__compresssion__functions_ga873701e40ef6eb9831c9cf66fc8cd981}\label{group__compresssion__functions_ga873701e40ef6eb9831c9cf66fc8cd981}} 
\index{Compression Functions@{Compression Functions}!uncompress\_to\_string@{uncompress\_to\_string}}
\index{uncompress\_to\_string@{uncompress\_to\_string}!Compression Functions@{Compression Functions}}
\doxysubsubsection{\texorpdfstring{uncompress\_to\_string()}{uncompress\_to\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::uncompress\+\_\+to\+\_\+string (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{bin,  }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Performs zlib-\/based decompression of data compressed by the \char`\"{}deflate\char`\"{} algorithm (\href{http://www.ietf.org/rfc/rfc1951.txt}{\texttt{ R\+FC 1951}}) and returns a string of the decompressed data. 


\begin{DoxyParams}{Parameters}
{\em bin} & the compressed data to decompress \\
\hline
{\em encoding} & the character encoding tag for the string return value; if not present, the \mbox{\hyperlink{character_encoding_default_encoding}{default character encoding}} is assumed.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the uncompressed data as a string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string str = \mbox{\hyperlink{group__compresssion__functions_ga873701e40ef6eb9831c9cf66fc8cd981}{uncompress\_to\_string}}(bin, \textcolor{stringliteral}{"iso-\/8859-\/1"});}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Z\+L\+I\+B-\/\+E\+R\+R\+OR} & The zlib library returned an error during processing (possibly due to corrupt input data) \\
\hline
\end{DoxyExceptions}
