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>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<h2>C Specification</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;revolution/cx.h&gt;</CODE><BR> <BR> <CODE>CXCompressionType CXGetCompressionType( const void* srcp );</CODE></dd>
20</dl>
21<h2>Arguments</h2>
22<TABLE border="1" width="100%">
23  <TBODY>
24    <TR>
25<TD width="13%"><EM><STRONG>srcp</STRONG></EM></TD>
26<TD width="87%">Source address where the compressed data is stored.</TD>
27    </TR>
28  </TBODY>
29</TABLE>
30
31<h2>Return Values</h2>
32<p>The compression format.</p>
33
34<H2>Description</H2>
35<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>
36<P>It is compatible with all compression formats supported by the CX library.</P>
37<P>The return values are enumerated type <CODE>CXCompressType</CODE> and have the following meanings:</P>
38<TABLE border="1">
39  <TBODY>
40    <TR>
41<TD><CODE>CX_COMPRESSION_LZ</CODE></TD>
42<TD>Data compressed using the LZ77 format.</TD>
43    </TR>
44    <TR>
45<TD><CODE>CX_COMPRESSION_HUFFMAN</CODE></TD>
46<TD>Data compressed using the Huffman format.</TD>
47    </TR>
48    <TR>
49<TD><CODE>CX_COMPRESSION_RL</CODE></TD>
50<TD>Data compressed using the Run Length format.</TD>
51    </TR>
52    <TR>
53<TD><CODE>CX_COMPRESSION_DIFF</CODE></TD>
54<TD>Data compressed with the difference filter applied.</TD>
55    </TR>
56  </TBODY>
57</TABLE>
58<h2>Internal Operation</h2>
59<P>Determines the compression type by reading the first four bytes of the data header.</P>
60
61<h2>See Also</h2>
62<p><CODE><A href="CXUncompressLZ.html">CXUncompressLZ</A>, <A href="CXUncompressHuffman.html">CXUncompressHuffman</A>, <A href="CXUncompressRL.html">CXUncompressRL</A>, <A href="CXUnfilterDiff.html">CXUnfilterDiff</A><BR> <A href="CXGetUncompressedSize.html">CXGetUncompressedSize</A><br></CODE></p>
63
64<H2>Revision History</H2>
65<P>07/06/2006 Initial version.</P>
66<hr>
67<P>CONFIDENTIAL</p>
68</BODY>
69</HTML>
70