Thread: test-me: text compression

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490

    test-me: text compression

    this program compresses text files using the huffman algorithm. please tell me what you think of it, and any critisism or compliments too.

    a couple of things to note:
    to run: huff-enc < file_to_compress
    this outputs out.ygc, the compressed file, and out.ygt, the lookup table.
    then run: huff-dec
    this inputs out.ygc and out.ygt and outputs out.ygf, the newly uncompressed file. note: be sure that all 3 output files are deleted before encoding a new file.

    because of the size restrictions of this board i haven't included executables with these programs. if you want the executables, see below

    huff3.cpp is included into each of the other files. eventually i will link it like a normal program. to compile, just compile huff-enc and huff-dec seperately. remember to keep the huff3.cpp file in the same directory.

    don't forget to tell me what you think (if you see bugs, report that too.)

    anyone who wants the binaries as well (windows 98 se) can download here:
    http://www.flashdaddee.com/forums/sh...&threadid=1990

    i've tested it on gcc 2.95.3 on redhat 7.2 linux (successfully), the borland free command line compiler under windows 98 se (successfully), and dev c++ 4 (successfully). borland gives me a fair share of warnings about unsigned to signed conversions, but that's not important.
    Last edited by ygfperson; 04-26-2002 at 05:51 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. test to binary & binary to text
    By wolfindark in forum C Programming
    Replies: 3
    Last Post: 07-01-2009, 05:29 AM
  2. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  3. Replies: 3
    Last Post: 05-25-2005, 01:50 PM
  4. mygets
    By Dave_Sinkula in forum C Programming
    Replies: 6
    Last Post: 03-23-2003, 07:23 PM
  5. Accessing a Specific Text Line Inside CEditView :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2002, 08:12 PM