📄 readme
字号:
DESCRIPTION-----------This archive contains a simple and readable ANSI C implementation of Huffmancoding 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://michael.dipperstein.com/huffmanhttp://datacompression.info/Huffman.shtmlFILES-----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 codesCOPYING - Rules for copying and distributing LGPL softwaregetopt.c - LGPL version of getopt source from GNU projectgetopt.h - LGPL version of getopt headers from GNU projecthuffman.c - Huffman encoding and decoding routineshuffman.h - Header file used by code calling library functions huflocal.h - Header file with internal library definitions common to both canonical and conventional techniqueshuflocal.c - File with internal library functions common to both canonical and conventional techniquesLICENSE - GNU Lesser General Public LicenseMakefile - makefile for this project (assumes gcc compiler and GNU make)README - this filesample.c - Demonstration of how to use Huffman library functionsBUILDING--------To build these files with GNU make and gcc, simply enter "make" from thecommand line.USAGE-----Usage: sample <options>options: -C : Encode/Decode using a canonical code. -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 <filename> : Name of input file. -o <filename> : Name of output file. -h|? : Print out command line options.-C Uses a canonical Huffman code (chuffman.c).-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 <filename> The name of the input file. There is no valid usage of this program without a specified input file.-o <filename> 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 symbols01/12/04 - Use bit stream file library02/02/04 - Use bit array library02/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.06/14/04 - Use latest version of bitfile.c. - Make routines local to huffman.c and chuffman.c static so that they may be called from the same program. - Include use of canonical and traditional Huffman codes in sample program.05/22/05 - Provides single declaration for items common canonical and traditional encoding source - Makefile builds libraries for easier LGPL compliance.06/21/05 - Corrected BitFileGetBits/PutBits error that accessed an extra byte when given an integral number of bytes.TODO----- 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@alumni.engr.ucsb.edu)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -