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=utf-8"> 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 <revolution/cx.h> 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<P> 52If data compressed in the LZ77 extended format is used with Revolution SDK version 3.0 or later versions, it can be uncompressed using the same API as for normal LZ77 compression data. 53</P> 54 55 56<h2>See Also</h2> 57<p class="reference"> 58<A href="CXGetUncompressedSize.html">CXGetUncompressedSize</A><BR><A href="CXUncompressLZ.html">CXUncompressLZ</A><BR><A href="CXSecureUncompressLZ.html">CXSecureUncompressLZ</A><BR><A href="CXInitUncompContextLZ.html">CXInitUncompContextLZ</A><BR><A href="CXReadUncompLZ.html">CXReadUncompLZ</A><BR> <A href="CXIsFinishedUncompLZ.html">CXIsFinishedUncompLZ</A><BR><A href="CXCompressLZ.html">CXCompressLZ</A><BR><A href="../tools/ntcompress.html">ntcompress</A> 59</p> 60 61<H2>Revision History</H2> 62<P> 632009/09/25 Explained data compressed in the LZ77 extended-compression format.<BR>2007/09/03 Corrected errors in the Description and See Also sections.<BR>2007/04/27 Initial version.<BR> 64</P> 65 66<hr><p>CONFIDENTIAL</p></body> 67</html> 68