We've Moved!
Visit SDSU’s new digital collections website at https://digitalcollections.sdsu.edu
Description
Huffman coding is an algorithm used for lossless data compression. The Huffman scheme uses a table of frequency of occurrence for each symbol (or character) in the input stream. Each character of input is encoded into a variable-length bit string and used for constructing a Huffman Tree. In this work, Huffman coding is used to compress JavaScript within an AJAX framework. On the Web application server, JavaScript source code is Huffman encoded by classification and stored in a relational database in Base64 format. When a particular script or a set of scripts are requested by a client browser, the application server returns the Base64 representation of the encoded script within a SOAP message. The browser, having first loaded a minimal uncompressed decoding script, transforms, decodes, and dynamically loads the received JavaScript payload. The performance of this technique is measured and compared against other contemporary JavaScript minifiers and compression systems such as Dojo ShrinkSafe, Douglas Crockford's JSMIN, Dean Edwards' Packer, and the Yahoo! YUI Compressor. Performance metrics are captured and analyzed by loading an example Rich Internet Application (RIA) over networks at different data rates, both with and without the use of a minifier or compressor. The ClassTA Course Management System developed at San Diego State University is used as a baseline RIA for gathering performance metrics. ClassTA is an AJAX-based Web application that features the look and feel of a desktop application and consists of tens of thousands of lines of JavaScript. Conclusions are drawn from the results of employing compressors over different data rates using different browsers with respect to loading and application startup time.