JTOOLS ASCII COMPRESSOR JTools Table of Contents Project Location: \JTools_ASCIICompressor The ASCII compression utility is a very small application that does not use NxCore and is not based on the JTools_ShellApplication framework. Rather it is a simple application to demonstrate compression and decompression of ASCII strings. Many Nanex customers distribute data from their own databases (which are populated by NxCore) or distribute NxCore data from the stream itself. In the majority of cases the data is sent on a packet by packet basis in an ASCII text format. One of the more common requests I hear is for a simple method to compress and decompress ASCII data, on a variety of platforms and with minimal performance impact. While Packet-per-packet compression will never achieve the results other compression techniques can achieve, it is certainly possible to reduce the data footprint by 50% using a technique called string substitution, which is very fast and very easy to implement on any platform. String substitution relies on the fact that the data set uses only 16 unique ASCII characters or less. Because the majority of data sent for financial information is all numeric, this is easily accomplished. The ASCII Compressor application demonstrates 4 functions, 2 for compressing and decompressing pure numeric data ( '0 - 9', '.', '-', ',', '|') and 2 are for compressing and decompressing numeric data that is also pre-pended with an ASCII string outside of the compression data set. The Main Application Window:
The character '|' was chosen as the string deliminator. Should you desire a different deliminator the source code for both the compression and extraction functions are very small and easy to modify. JTools Table of Contents |