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=utf-8"> 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<p><i><CODE>ntcompress.exe</CODE> also exists as <CODE>ntcompressD.exe</CODE> in this program. There is no difference in how the two behave. Normally you should use <CODE>ntcompress.exe</CODE>. <CODE>ntcompressD.exe</CODE> remains in order to maintain compatibility with past systems.</i></p> 30 31<H3>Format of Options for Designating the Compression Method</H3> 32<P>The following formats can be designated for the compression method: 33</P> 34<TABLE border="1" width="95%"> 35 <TBODY> 36 <TR> 37<TH width="15%">Options</TH> 38<TH width="30%">Compression Method</TH> 39<TH>Parameters</TH> 40 </TR> 41 <TR> 42<TD><CODE><code>-d</code></CODE></TD> 43<TD>Difference filtering.</TD> 44<TD>Specify the bit size of the comparison unit <CODE>{8|16}</CODE>.</TD> 45 </TR> 46 <TR> 47<TD><CODE><CODE>-r</CODE></CODE></TD> 48<TD>Run-length compression.</TD> 49<TD>None.</TD> 50 </TR> 51 <TR> 52<TD><CODE><code>-h</code></CODE></TD> 53<TD>Huffman compression.</TD> 54<TD>Specify the bit size to encode <CODE>{4|8}</CODE>.</TD> 55 </TR> 56 <TR> 57<TD><CODE><CODE>-lex</CODE></CODE></TD> 58<TD>LZ77 extended compression (*1).</TD> 59<TD>None.</TD> 60 </TR> 61 <TR> 62<TD><CODE><code>-l</code></CODE></TD> 63<TD>LZ77 compression (for backward compatibility).</TD> 64<TD>None.</TD> 65 </TR> 66 <TR> 67<TD><CODE>-lh</CODE></TD> 68<TD>LH format (*2).</TD> 69<TD>None.</TD> 70 </TR> 71 <TR> 72<TD><CODE>-lrc</CODE></TD> 73<TD>LRC format (*3).</TD> 74<TD>None.</TD> 75 </TR> 76 </TBODY> 77</TABLE> 78 79<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>API</CODE></A>, but 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. 80</P> 81 82<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. 83</P> 84 85<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> 86</P> 87<H2>Location</H2> 88<P><CODE>$(REVOLUTION_SDK_ROOT)/X86/bin/ntcompress.exe</CODE></P> 89 90<H2>See Also</H2> 91<P class="reference"> 92<A href="../cx/CXUncompressHuffman.html">CXUncompressHuffman</A><BR><A href="../cx/CXUncompressRL.html">CXUncompressRL</A><BR><A href="../cx/CXUncompressLZ.html">CXUncompressLZ</A><BR><A href="../cx/CXReadUncompHuffman.html">CXReacUncompHuffman</A><BR><A href="../cx/CXReadUncompRL.html">CXReadUncompRL</A><BR><A href="../cx/CXReadUncompLZ.html">CXReadUncompLZ</A> 93</P> 94 95<H2>Revision History</H2> 96<P> 972009/06/05 Explained the existence of <CODE>*.exe</CODE> and <CODE>*D.exe</CODE>.<br>2007/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> 98</P> 99 100<hr><p>CONFIDENTIAL</p></body> 101</HTML>