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_CompressRL</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_CompressRL <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<CODE>#include <nitro/mi.h></CODE><BR> <BR> <CODE>u32 MI_CompressRL( const u8 *srcp, u32 size, u8 *dstp );<BR></CODE></dd> 20</dl> 21<h2>Arguments</h2> 22<TABLE border="1" width="100%"> 23 <TBODY> 24 <TR> 25<TD width="13%"><SPAN class="argument">srcp</SPAN></TD> 26<TD width="87%">Source address where the data to compress is stored.</TD> 27 </TR> 28 <TR> 29<TD><SPAN class="argument">size</SPAN></TD> 30<TD>Data size of the source to compress.</TD> 31 </TR> 32 <TR> 33<TD width="13%"><SPAN class="argument">dstp</SPAN></TD> 34<TD width="87%">Needs a pointer to the compression destination buffer and a region greater than the source data size. Needs a 4-byte alignment.</TD> 35 </TR> 36 </TBODY> 37</TABLE> 38 39<h2>Return Values</h2> 40<p>Returns the size of the compressed data. If the data after compression is larger than the source file, no compression is performed, and 0 is returned.</p> 41 42<H2>Description</H2> 43<P>Performs RL-compression on the data and 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.</P> 44<P>The function writes in 8-bit units, so for NITRO, an address in VRAM cannot be specified in <SPAN class="argument">dstp</SPAN>. <BR>An address in VRAM can be specified in <SPAN class="argument">srcp</SPAN> for both NITRO and TWL.</P> 45 46<h2>Internal Operation</h2> 47<P>Processing takes place only on the CPU, without the use of a system call or DMA.</P> 48 49<h2>See Also</h2> 50<p><A href="MI_UncompressRL.html"><CODE>MI_UncompressRL*</CODE></A><BR> <A href="MI_ReadUncompRL.html"><CODE>MI_ReadUncompRL</CODE></A><BR> <A href="MI_CompressLZ.html"><CODE>MI_CompressLZ*</CODE></A><BR> <A href="MI_CompressHuffman.html"><CODE>MI_CompressHuffman</CODE></A></p> 51 52<H2>Revision History</H2> 53<P>2008/12/05 Added TWL-related description.</P> 54<P>2005/02/01 Initial version.</P> 55<hr><p>CONFIDENTIAL</p></body> 56</html> 57