1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>ntcompress</TITLE> 8<LINK rel="stylesheet" href="../CSS/revolution.css" type="text/css"> 9</HEAD> 10<BODY> 11 12<H1 align="left">ntcompress</H1> 13 14<H2>Description</H2> 15<P><code>ntcompress</code> is a tool that creates compressed data in a format that can be handled by the CX library.</P> 16 17<H2>Using the Library</H2> 18<H3>Start Command</H3> 19<dl><dd><pre class="construction">% ntcompress <-d8|d16|r|l|h4|h8|lex|lh|lrc> [-s] [-<t|T>[width]] [-H] [-A(4|8|16|32)] [-o outputFile] 20<inputFile><BR> 21% ntcompress -x [-o outputFile] [-s] <inputFile> 22</pre></dd></dl> 23 24<P>Compresses and converts the input file designated by <CODE>inputFile</CODE> into a designated format. Run-length compression, LZ77 extended compression, Huffman compression, and difference filter conversion are all possible.</P> 25<P><CODE>-s</CODE> option: No messages will be displayed to indicate that compression was successful.</P> 26<P><CODE>-H</CODE> option: Because header information is added to the data before it is compressed, the data size will also be appended to the data following expansion.<BR><BR><BR> <CODE>-A</CODE> option: Use this to pad the end of the output file with zeros so that the file size is in alignment to the number of bytes specified by the <B>n</B> argument.<BR><BR><BR> <CODE>-o</CODE> option: Use this to specify the output file's file name. When nothing is designated, the output file is created with the name "(<I>input filename console part</I>)<code>_</code>(<I>compression method</I>)<code>.bin</code>".<BR><BR> <CODE>-t</CODE> or <CODE>-T</CODE> option: Use this to create the output file as a C-format text file.<BR>By adding (1 | 2 | 4) to the option, you can choose between the u8, u16, and u32 types. (The default is u8.)<BR> If u16 or u32 is specified, the file is output as little-endian with the <CODE>-t</CODE> option or as big-endian with the <CODE>-T</CODE> option.<BR><BR> <CODE>-x</CODE> option: Use this to allow the compressed file to be expanded on a PC using <CODE>ntcompress</CODE>. 27</P> 28 29<H3>Format of Options for Designating the Compression Method</H3> 30<P>The following formats can be designated for the compression method: 31</P> 32<TABLE border="1" width="95%"> 33 <TBODY> 34 <TR> 35<TH width="15%">Options</TH> 36<TH width="30%">Compression Method</TH> 37<TH>Parameters</TH> 38 </TR> 39 <TR> 40<TD><CODE><code>-d</code></CODE></TD> 41<TD>Difference filtering.</TD> 42<TD>Specify the bit size of the comparison unit <CODE>{8|16}</CODE>.</TD> 43 </TR> 44 <TR> 45<TD><CODE><CODE>-r</CODE></CODE></TD> 46<TD>Run-length compression.</TD> 47<TD>None.</TD> 48 </TR> 49 <TR> 50<TD><CODE><code>-h</code></CODE></TD> 51<TD>Huffman compression.</TD> 52<TD>Specify the bit size to encode <CODE>{4|8}</CODE>.</TD> 53 </TR> 54 <TR> 55<TD><CODE><CODE>-lex</CODE></CODE></TD> 56<TD>LZ77 extended compression (*1).</TD> 57<TD>None.</TD> 58 </TR> 59 <TR> 60<TD><CODE><code>-l</code></CODE></TD> 61<TD>LZ77 compression (for backward compatibility).</TD> 62<TD>None.</TD> 63 </TR> 64 <TR> 65<TD><CODE>-lh</CODE></TD> 66<TD>LH format (*2).</TD> 67<TD>None.</TD> 68 </TR> 69 <TR> 70<TD><CODE>-lrc</CODE></TD> 71<TD>LRC format (*3).</TD> 72<TD>None.</TD> 73 </TR> 74 </TBODY> 75</TABLE> 76 77<P>(*1) You can expect a higher compression ratio with the LZ77 extended compression than with LZ77 compression, but the <CODE>-l</CODE> option is preserved for backward compatibility. Either format can be decompressed using the same <A href="../cx/CXUncompressLZ.html"><CODE>CXUncompressLZ</CODE></A> function; however keep in mind that programs using RVL-SDK 2.4 or earlier cannot expand files compressed in the LZ77 extended format.<BR>The extra processing required for compression/decompression is nearly equal for the LZ extended (<CODE>-lex</CODE>) and backward compatible (<CODE>-l</CODE>) versions. 78</P> 79 80<P>(*2) This format is a mix of LZ77 and Huffman compression. Although this depends on the data, you can expect a comparatively high compression ratio. Decompression speed is slower than that obtained with run-length, Huffman, or LZ77 compression. Run-time compression is not supported. 81</P> 82 83<P>(*3) This format is a mix of LZ77 and RangeCoder compression. Although this depends on the data, you can expect a comparatively high compression ratio. Be aware that it has the slowest decompression speed. Run-time compression is not supported. <BR> 84</P> 85 86<H2>Location</H2> 87<P><CODE>$(REVOLUTION_SDK_ROOT)/X86/bin/ntcompress.exe</CODE></P> 88 89<H2>See Also</H2> 90<P class="reference"> 91<A href="../cx/CXUncompressHuffman.html">CXUncompressHuffman</A>, 92<A href="../cx/CXUncompressRL.html">CXUncompressRL</A>, 93<A href="../cx/CXUncompressLZ.html">CXUncompressLZ</A>, 94<A href="../cx/CXReadUncompHuffman.html">CXReacUncompHuffman</A>, 95<A href="../cx/CXReadUncompRL.html">CXReadUncompRL</A>, 96<A href="../cx/CXReadUncompLZ.html">CXReadUncompLZ</A> 97</P> 98 99<H2>Revision History</H2> 100<P> 1012007/11/01 LH and LRC formats.<BR> 2007/04/28 Added LZ77 extended compression.<BR>2006/11/30 Added options for alignment specifications and decompression.<BR>2006/07/06 Initial version.<BR> 102</P> 103 104<hr><p>CONFIDENTIAL</p></body> 105</HTML>