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 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_ReadUncompLZ*</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_ReadUncompLZ* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19 <PRE><CODE>#include <nitro/mi/uncomp_stream.h></CODE><BR> 20 21<CODE>s32 MI_ReadUncompLZ8( <A href="MIUncompContextLZ.html">MIUncompContextLZ</A> *context, 22 const u8* data, 23 u32 len );</CODE><br> 24<CODE>s32 MI_ReadUncompLZ16( <A href="MIUncompContextLZ.html">MIUncompContextLZ</A> *context, 25 const u8* data, 26u32 len );</CODE></PRE> 27 </dd> 28</dl> 29<h2>Arguments</h2> 30<TABLE border="1" width="100%"> 31 <TBODY> 32 <TR> 33<TD width="13%"><SPAN class="argument">context</SPAN></TD> 34<TD width="87%">Pointer to the context structure for uncompression of LZ77-compressed data.</TD> 35 </TR> 36 <TR> 37<TD width="13%"><SPAN class="argument">data</SPAN></TD> 38<TD width="87%">Pointer to a portion of the data to be uncompressed.</TD> 39 </TR> 40 <TR> 41<TD><SPAN class="argument">len</SPAN></TD> 42<TD>Size of the data provided in the second argument.</TD> 43 </TR> 44 </TBODY> 45</TABLE> 46 47<h2>Return Values</h2> 48<p>Returns the number of remaining bytes of data being uncompressed. If all of the data is finished being uncompressed, the function returns 0.</p> 49 50<H2>Description</H2> 51<P>Performs streaming uncompression of LZ77-compressed data, doing just the data size given, and copying it to the buffer specified by the <A href="MI_InitUncompContextLZ.html"><CODE>MI_InitUncompContextLZ</CODE></A> function. This function is slow compared to the <A href="MI_UncompressLZ.html"><CODE>MI_UncompressLZ*</CODE></A> function, which uncompresses all the data at once.</P> 52<P>The <code>MI_ReadUncompLZ8</code> function writes in units of 8 bits. On NITRO, you cannot decompress directly to VRAM. On TWL, this is possible, but it is quite slow.<BR><BR> The <code>MI_ReadUncompLZ16</code> function writes in units of 16 bits. On both NITRO and TWL, you can also decompress directly to VRAM. However, the process is slower compared to normal memory.<BR>For compressed data, allow for a 2-byte lead when searching for matching strings.</P> 53 54<P>Decompresses data compressed in LZ77 or LZ77 extended format using <A href="../../tools/ntrcomp.html"><CODE>ntrcomp</CODE> tool</A> or an <A href="MI_CompressLZ.html"><CODE>MI_CompressLZ*</CODE></A> function.</P> 55 56<h2>Internal Operation</h2> 57<P>Processing only takes place on the CPU, without the use of a system call or DMA.</P> 58<h2>See Also</h2> 59<p><A href="MI_UncompressLZ.html"><CODE>MI_UncompressLZ*</CODE></A><BR> <A href="MI_InitUncompContextLZ.html"><CODE>MI_InitUncompContextLZ</CODE></A><BR> <A href="MIUncompContextLZ.html"><CODE>MIUncompContextLZ</CODE></A><BR> <A href="MI_ReadUncompRL.html"><CODE>MI_ReadUncompRL*</CODE></A><BR> <A href="MI_ReadUncompHuffman.html"><CODE>MI_ReadUncompHuffman</CODE></A><BR> <A href="MI_CompressLZ.html"><CODE>MI_CompressLZ*</CODE></A></p> 60 61<H2>Revision History</H2> 62<P> 632008/12/05 Added description of TWL. <BR> 2007/11/01 Added description of LZ77 extended compression. <BR> 2004/11/30 Initial version.</P> 64<hr><p>CONFIDENTIAL</p></body> 65</html> 66