huffman-0.4

所属分类:压缩解压
开发工具:Java
文件大小:46KB
下载次数:6
上传日期:2012-04-01 02:32:19
上 传 者sakshi1234
说明:  source code for file compression using Huffman coding in java

文件列表:
COPYING (819, 2004-02-26)
LICENSE (18303, 2004-02-26)
Makefile (1409, 2004-02-26)
bitarray.c (28878, 2004-02-26)
bitarray.h (3690, 2004-02-04)
bitfile.c (15767, 2004-02-04)
bitfile.h (3727, 2004-02-04)
chuffman.c (31596, 2004-02-26)
getopt.c (21420, 2004-01-13)
getopt.h (4511, 2004-01-13)
huffman.c (28520, 2004-02-26)
huffman.h (2098, 2004-02-26)
sample.c (7143, 2004-02-26)

DESCRIPTION ----------- This archive contains a simple and readable ANSI C implementation of Huffman coding and decoding. This implementation is not intended to be the best, fastest, smallest, or any other performance related adjective. More information on Huffman encoding may be found at: http://datacompression.info/Huffman.shtml FILES ----- bitarray.c - Library providing logical operations on arbitrary length arrays of bits. bitarray.h - Header for bit array library. bitfile.c - Library to allow bitwise reading and writing of files. bitfile.h - Header for bitfile library. chuffman.c - Huffman encoding and decoding routines using canonical codes COPYING - Rules for copying and distributing LGPL software getopt.c - LGPL version of getopt source from GNU project getopt.h - LGPL version of getopt headers from GNU project huffman.c - Huffman encoding and decoding routines LICENSE - GNU Lesser General Public License Makefile - makefile for this project (assumes gcc compiler and GNU make) README - this file sample.c - Demonstration of how to use Huffman library functions BUILDING -------- To build these files with GNU make and gcc, simply enter "make" from the command line. By default the Makefile will build a canonical Huffman code sample. Edit the variable HUFFOBJ to build traditional Huffman code (see comments in Makefile). USAGE ----- Usage: sample options: -c : Encode input file to output file. -d : Decode input file to output file. -t : Generate code tree for input file to output file. -i : Name of input file. -o : Name of output file. -h|? : Print out command line options. -c Generates a Huffman tree for the specified input file (see -i) and compresses a file using the tree to the specified output file (see -o). -d Decompresses the specified input file (see -i) writing the results to the specified output file (see -o). Only files compressed by this program may be decompressed. -t Generates a Huffman tree for the specified input file (see -i) and writes the resulting code to the specified output file (see -o). -i The name of the input file. There is no valid usage of this program without a specified input file. -o The name of the output file. If no file is specified, stdout will be used. NOTE: Sending compressed output to stdout may produce undesirable results. HISTORY ------- 10/23/03 - Corrected errors which occurred when encoding and decoding files containing a single symbol. - Modified canonical version to dynamically allocate the array used to store the canonical list of codes. - Use $(OS) environment variable to determine operating system in Makefile. 11/20/03 - Correctly handle symbol codes that are over 16 bits long. These changes can handle codes up to 255 bits long. 01/05/04 - Encode EOF along with other symbols 01/12/04 - Use bit stream file library 02/02/04 - Use bit array library 02/25/04 - Make huffman.c and chuffman.c more library like by removing main and adding a header file with prototypes for encode/decode functions. - Add sample usage of functions. TODO ---- - Combine common huffman and chuffman code into a single library. - Provide a command line option to change symbol size. - Implement bijective scheme for ending file on byte boundary without counting the number of encoded symbols encoded (http://bijective.dogma.net/). AUTHOR ------ Michael Dipperstein (mdipper@cs.ucsb.edu)

近期下载者

相关文件


收藏者