ntcompress is a tool that creates compressed data in a format that can be handled by the CX library.
% ntcompress <-d8|d16|r|l|h4|h8|lzex> [-s] [-<t|T>[width]] [-H] [-A(4|8|16|32)] [-o outputFile] <inputFile>
% ntcompress -x [-o outputFile] [-s] <inputFile>
Compresses and converts the input file that is designated by inputFile into the designated format. Run-length compression, LZ77 extended compression, Huffman compression, and difference filter conversion are all possible.
With the -s option, the message indicating successful compression will not be displayed.
With the -H option, the data size is also appended to the data after expansion occurs. This is because header information is added to the data and compressed.
With the -A option, the end of the output file is padded with zeros so that the file size is in alignment with the byte size of the n argument.
With the -o option, the file name of the output file can be designated. If nothing is designated, the output file is created with the name (input file name console part)_(compression method).bin.
With the -t or -T option, the output file can be created as a C format text file. By adding options (1|2|4), you can choose between the u8, u16, and u32 types. (The default is u8.)
If u16 or u32 is specified, the file is output as little-endian with the -t option or as big-endian with the -T option.
With the -x option, ntcompress is used and the compressed file is decompressed on the PC.
The following formats can be designated for the compression method:
| Options | Conversion Method | Parameters |
|---|---|---|
-d |
Difference filter | Designates the bit size of the comparison unit { 8 | 16 }. |
-r |
Run length compression | None. |
-h |
Huffman compression | Designates the bit size to encode { 4 | 8 }. |
-lex |
LZ77 extended compression | None. |
-l |
LZ77 compression (for backward compatibility) | None. |
Although you can expect a higher compression ratio with the LZ77 extended compression as compared to the LZ77 compression, the -l option is preserved for backward compatibility.
Although either format can be decompressed using the same CXUncompressLZ function, note that the files compressed in the LZ77 format by the programs that use a version of the SDK prior to RVL-SDK 3.0 cannot be decompressed.
$(REVOLUTION_SDK_ROOT)/X86/bin/ntcompress.exe
CXUncompressHuffman, CXUncompressRL, CXUncompressLZ,
CXReacUncompHuffman, CXReadUncompRL, CXReadUncompLZ
2007/04/28 Added LZ extended compression.
2006/11/30 Added options for alignment specifications and decompression.
2006/07/06 Initial version.
CONFIDENTIAL