Yûki - Compress working
This commit is contained in:
parent
e7305b7ab8
commit
c8a0b3f359
7 changed files with 104 additions and 140 deletions
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef __ARBRE_BINAIRE__
|
||||
#define __ARBRE_BINAIRE__
|
||||
|
||||
typedef int Elt;
|
||||
typedef char Elt;
|
||||
typedef int bool;
|
||||
struct znoeud {
|
||||
char elt ;
|
||||
Elt elt ;
|
||||
int poids;
|
||||
struct znoeud *fils_gauche;
|
||||
struct znoeud *fils_droit;
|
||||
|
|
@ -12,19 +12,15 @@ struct znoeud {
|
|||
typedef struct znoeud noeud ;
|
||||
typedef struct znoeud * arbre;
|
||||
|
||||
typedef struct zcode{
|
||||
int lettre;
|
||||
char *s;
|
||||
} codage;
|
||||
typedef struct zcode * code;
|
||||
|
||||
arbre creer_arbre_vide(void);
|
||||
arbre creer_arbre_huffman(Elt e, int p, arbre fg, arbre fd);
|
||||
arbre fils_gauche(arbre a);
|
||||
arbre fils_droit(arbre a);
|
||||
Elt racine(arbre a);
|
||||
bool est_arbre_vide(arbre a);
|
||||
|
||||
arbre creer_feuille(Elt e, int p) ;
|
||||
bool est_feuille(arbre a) ;
|
||||
void arbre_rechercher(arbre a, Elt c, char s[], int s_len, int found[]);
|
||||
void serialisation(arbre a,FILE *file);
|
||||
#endif
|
||||
|
|
|
|||
Reference in a new issue