1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>CXCompressLZEx</title>
9<LINK rel="stylesheet" href="../CSS/revolution.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">CXCompressLZEx</h1>
15
16<h2>Syntax</h2>
17<DL><DD><PRE class="construction">
18#include &lt;revolution/cx.h&gt;
19
20u32 CXCompressLZEx( const u8 *srcp, u32 size, u8 *dstp, void* work );
21</PRE></dd></dl>
22
23<h2>Arguments</h2>
24<TABLE class="arguments" border="1">
25  <TBODY>
26    <TR>
27<TH>srcp</TH>
28<TD>The source address that stores the data to be compressed.</TD>
29    </TR>
30    <TR>
31<TH>size</TH>
32<TD>The data size of the source to be compressed.</TD>
33    </TR>
34    <TR>
35<TH>dstp</TH>
36<TD>Needs a pointer to the compression destination buffer, and a region greater than the source data size. Requires 4-byte alignment.</TD>
37    </TR>
38    <TR>
39<TH>work</TH>
40<TD>Temporary work buffer used for compression. It requires a size equal to <CODE>CX_LZ_COMPRESS_WORK_SIZE</CODE> bytes.</TD>
41    </TR>
42  </TBODY>
43</TABLE>
44
45<h2>Return Values</h2>
46<p>Returns the size of the compressed data. If the data after compression is larger than the source file, no compression will be performed and a zero will be returned.</p>
47
48<H2>Description</H2>
49<P>Performs LZ77 extended compression on the data, then writes it to a specified memory region. A region of the same size as the source data must be prepared in the compression destination buffer.<BR><BR> This function generally provides a higher compression ratio than the <A href="CXCompressLZ.html"><CODE>CXCompressLZ</CODE></A> function.<BR>This function is equivalent to running the <A href="../tools/ntcompress.html"><CODE>ntcompress</CODE></A> tool with the <CODE>-lex</CODE> option.
50</P>
51
52<h2>See Also</h2>
53<p class="reference">
54<A href="CXGetUncompressedSize.html">CXGetUncompressedSize</A>,
55<A href="CXUncompressLZ.html">CXUncompressLZ</A>,
56<A href="CXSecureUncompressLZ.html">CXSecureUncompressLZ</A>,
57<A href="CXInitUncompContextLZ.html">CXInitUncompContextLZ</A>,
58<A href="CXReadUncompLZ.html">CXReadUncompLZ</A>,
59<A href="CXIsFinishedUncompLZ.html">CXIsFinishedUncompLZ</A>,
60<A href="CXCompressLZ.html">CXCompressLZ</A>,
61<A href="../tools/ntcompress.html">ntcompress</A>
62</p>
63
64<H2>Revision History</H2>
65<P>
662007/09/03 Corrected errors in the Description and See Also sections.<BR>2007/04/27 Initial version.<BR>
67</P>
68
69<hr><p>CONFIDENTIAL</p></body>
70</html>
71