########################################################## Lossy Compression for 1D, 2D and 3D data using Wavelets Chris Fleizach cfleizac@cs.ucsd.edu June 4th, 2006 ########################################################## INSTALLATION Go to src/c++ Unix/Linux users, Edit Makefile and change the line where it says CYGWIN to CYGWIN=no You will need the library iconv installed on your system. This is included on most systems automatically Windows/Cygwin users, Edit Makefile and change the line where it says CYGWIN to CYGWIN=yes You may need to install the inconv library through the Cygwin installer in order for the system to work Then type: make This will create two programs: wavecomp (compressor) wavedec (decompressor) ########################################################## DESCRIPTION wavecomp takes a binary data file as input and outputs a compressed version with the extenstion ".wcm" added to the end of the original file name. wavedec takes a compressed ".wcm" file and outputs a the decompressed file. It strips the ".wcm" off the filename and outputs to that file. Note: wavedec will overwrite your original data if it still exists with the same name. ########################################################## Matlab Usage [savings] = WAVECOMPRESS(x,mode,outputfile) % compresses the % 1-D data in x using the mode specified and saves to outputfile. % The return value is compression ratio achieved [savings] = WAVECOMPRESS2(x,mode,outputfile) % compresses the 2-D data in x using the mode specified % and saves to outputfile. The return value is compression % ratio achieved [x] = WAVEDECOMPRESS(inputfile) % takes the compressed inputfile and returns a reconstructed % 1-D signal x [x] = WAVEDECOMPRESS2(inputfile) % takes the compressed inputfile and returns a reconstructed % 2-D signal x ########################################################## C++ USAGE wavecomp Usage: wavecomp [options] source Options: -c compression mode (1=high compress/high error, 2=medium/low, 3=low/low) -d dimension of data (= 1, 2, 3) -l zero limit (ex: .0001 removes all abs(values) < .0001) -p -m -s 3-Node parallel mode where this machine is master and 2 slaves are -p -s Parallel mode where this machine is a slave -v verbose -i data format instructions wavedec Usage: wavedec source Options: -v verbose ########################################################## DATA FORMAT The format of the data that wavecomp expects requires that the first X numbers indicate the size of the dataset where X is the dimension. So if the dataset is 2D, then the first two doubles must encode the X size and the Y size. The remainder of the file must have X*Y doubles.