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="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>CXGetCompressionType</title> 9<LINK rel="stylesheet" href="../CSS/revolution.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">CXGetCompressionType</h1> 15 16<h2>Syntax</h2> 17<DL><DD><PRE class="construction">#include <revolution/cx.h> 18 19CXCompressionType CXGetCompressionType( const void* srcp ); 20</PRE></dd></dl> 21 22<h2>Arguments</h2> 23<TABLE class="arguments" border="1"> 24 <TBODY> 25 <TR> 26<TH>srcp</TH> 27<TD>Source address where the compressed data is stored.</TD> 28 </TR> 29 </TBODY> 30</TABLE> 31 32<h2>Return Values</h2> 33<p>The compression format.</p> 34 35<H2>Description</H2> 36<P>This function obtains the compression format by checking the data header information of the compressed data. This function does not check the contents of the compressed data but only reads the compression format included in the beginning of the data.</P> 37<P>It is compatible with all compression formats supported by the CX library.</P> 38<P>The return values are enumerated type <CODE>CXCompressType</CODE> and have the following meanings:</P> 39<TABLE class="arguments" border="1"> 40 <TBODY> 41 <TR> 42<TH>CX_COMPRESSION_RL</TH> 43<TD>Data compressed using the run-length compression format.</TD> 44 </TR> 45 <TR> 46<TH>CX_COMPRESSION_LZ</TH> 47<TD>Data compressed using the LZ77-extended or LZ77 compression format.</TD> 48 </TR> 49 <TR> 50<TH>CX_COMPRESSION_HUFFMAN</TH> 51<TD>Data compressed using the Huffman format.</TD> 52 </TR> 53 <TR> 54<TH>CX_COMPRESSION_LH</TH> 55<TD>Data compressed using the LH format.</TD> 56 </TR> 57 <TR> 58<TH>CX_COMPRESSION_LRC</TH> 59<TD>Data compressed using the LRC format.</TD> 60 </TR> 61 <TR> 62<TH>CX_COMPRESSION_DIFF</TH> 63<TD>Data compressed with an applied difference filter.</TD> 64 </TR> 65 </TBODY> 66</TABLE> 67<h2>Internal Operation</h2> 68<P>Determines the compression type by reading the value of the data header's first byte.</P> 69 70<h2>See Also</h2> 71<p class="reference"> 72<A href="CXUncompressLZ.html">CXUncompressLZ</A>, 73<A href="CXUncompressHuffman.html">CXUncompressHuffman</A>, 74<A href="CXUncompressRL.html">CXUncompressRL</A>, 75<A href="CXUnfilterDiff.html">CXUnfilterDiff</A>, 76<A href="CXGetUncompressedSize.html">CXGetUncompressedSize</A> 77</p> 78 79<H2>Revision History</H2> 80<P> 812007/09/03 Changed from 4 to 1 the number of bytes needed to determine the compression format.<BR>2006/07/06 Initial version.<BR> 82</P> 83<hr><p>CONFIDENTIAL</p></body> 84</html>