huffman compresion

From: Isidro Jimenez Ovelar (PACHINO3@santandersupernet.com)
Date: Fri Sep 05 1997 - 23:49:30 MET DST


From: "Isidro Jimenez Ovelar" <PACHINO3@santandersupernet.com>
To: <caml-list@inria.fr>
Subject: huffman compresion
Date: Fri, 5 Sep 1997 23:49:30 +0200

I am new in this group, I am a student of informatic at
Politecnica of Madrid University. I have to use caml to make
a practice and I 'd be very pleased if someone of you
could help a little bit.

        This the job: Huffman compression

The functions I have to do are:

Frecuency1: (* File -> (int ,float) Tabla *)
(* this function read a file in binary mode and give one
table with the frecuencies of each simbol *)

Maketree: (* (`symbol , float) Table -> `symbol list -> symbol Huftree

(* This function take the table of relatives frecuencies and the
list of symbols of the file and gives a Huffman tree *)

Compress (* int Hufftree -> file -> file -> unit *)
¦
¦ (* This function takes the name of a file to compress and the
compressed
¦ filed and inteprets the data byte to byte *)
¦
¦ UnCompress (*int Hufftree -> File -> File -> unit *)
¦ (*This function makes the opposite of Compress*)
¦
¦ I use these types:
¦
¦
¦
¦type 'symbol Huftree =
¦
¦ Hoja of 'symbol
¦ |final
¦ |Nodo of 'symbol Huftree * 'symbol Huftree;;
¦
¦type file == string;;
¦
¦
¦ I have some problems to make the Huffman tree and the compress
and
¦ uncompress functions. If someone have done something similar or
have
¦ any ideas to help me I would be very grateful.
¦
¦ Thanks for all.
¦
¦
¦



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:12 MET