PPMC TABLE OF CONTENTS -Description -Compiling -Files included in this release -Timing -Author -Disclaimer DESCRIPTION This is the source code of an implementation of ppmc. The data structures used are hash tables instead of a context trie. A file is compressed and decompressed like that: ppmc inputfile compressedfile unppmc compressedfile outputfile I don't recommend to use this for compressing vital information, because it hasn't been fully tested, and moreover, the machine where the decompressor is being run, must have at least as much memory as the encoder had. I recommend to use this compressor only for researching pourposes. For further information read ac_ppmc.html also included in the package, for the latest version visit http://www.ross.net/arturocampos COMPILING The source code is in the C programming language, and was successfully compiled with Djgpp version 2.02, a project was made which included the following files for the encoder (call this project ppmc): ppmc.c ppmcdata.c ppmcmain.c range.c And for the decoder (call this project unppmc) ppmc.c ppmcdata.c range.c unppmc.c Then you just have to hit F9 and wait. I tried to do makefiles, however there was something wrong and it didn't worked. If someone has any idea about it, or how to compile this source for other compilers, please let me know it, so in the next release I can include makefiles. FILES INCLUDED IN THIS RELEASE In the zip file ac_ppmc_html.zip you should find: readme.txt -> The file you're reading now. ac_ppmc.html -> article which explains ppmc and the data structures used ppmc.c -> This is the main file which includes all the routines used by both the encoder and decoder's model. range.c -> The encoder and decoder's routines. ppmcmain.c -> The main routine for the compressor unppmc.c -> The main routine for the decompressor ppmcdata.c -> Global data structures. (used mainly by ppmc.c) ppmc.h -> Declarations of routines ppmcdata.h -> Declarations of global data and structures range.h -> Declarations of the routines for the range encoder and decoder ppmc.exe -> A compiled version of the compressor unppmc.exe -> A compiled version of the decompressor All this files are the implementation of ppmc order-4 using lazy exclusions. In the /exclusion directory you can find the same files (unless readme) but for ppmc order-4 using full exclusion. I thought there was no need to include the files for ppmc-o3h, because they are nothing else than ppmc with lazy exclusions, using only order-2 (and lowers) but instead of using the hash key for order-2 it uses the one for order-3. (you also have to take care about o3_byte, of course) The executables were compiled with Djgpp 2.95 using only the switch -O6. TIMING The standard function to get the time "time()", has a maximum precision of seconds. This is not enough for testing the speed of a compressor. Due to this timing was not included in this release. If you are interested on compiling it with Djgpp, my original version used the following code: struct time ppmc_time, ppmc_time2; double _time2, _time; // Get current time gettime(&ppmc_time); //Compress file // Print bpb and kbyps gettime(&ppmc_time2); printf("%s at %f bpb in ",argv[1],((float)filesize(file_output)/(float)size_file_input)*(float)8); _time=((ppmc_time.ti_min)*60)+(ppmc_time.ti_sec)+(((double)ppmc_time.ti_hund)/100); _time2=((ppmc_time2.ti_min)*60)+(ppmc_time2.ti_sec)+(((double)ppmc_time2.ti_hund)/100); if((_time2-_time)!=0) printf("%f kbytes/seconds.", ((float)size_file_input/(float)1024)/(_time2-_time)); AUTHOR This code was made by Arturo San Emeterio Campos, you can find his home page at: http://www.ross.net/arturocampos And his email is: arturo-campos@mixmail.com DISCLAIMER Copyright (c) Arturo San Emeterio Campos 1999. All rights reserved. Permission is granted to make verbatim copies of this files for private use only. There is ABSOLUTELY NO WARRANTY. Use it at your OWN RISK. Arturo San Emeterio Campos, Barcelona 04-Jan-2000