Yûki - Compress working
This commit is contained in:
parent
e7305b7ab8
commit
c8a0b3f359
7 changed files with 104 additions and 140 deletions
|
|
@ -3,11 +3,11 @@
|
|||
*/
|
||||
#ifndef __GESTION_FICHIERS__
|
||||
#define __GESTION_FICHIERS__
|
||||
#include <stdio.h>
|
||||
#define BLOCK_SIZE 128 //il faut changer sa valeur pour les tests avec blocsize = nb d'octet qu'on veut écrire
|
||||
#define BLOCK_SIZE 1 //il faut changer sa valeur pour les tests avec blocsize = nb d'octet qu'on veut écrire
|
||||
|
||||
struct zBin_file{
|
||||
FILE *file; // Identificateur fichier
|
||||
typedef struct
|
||||
{
|
||||
FILE *file; // Identificateur fichier
|
||||
char mode; //Mode de lecture r ou w
|
||||
unsigned char record[BLOCK_SIZE]; //Tampon pour lire ou écrire
|
||||
int record_length; //nombre d'élèments du tampon
|
||||
|
|
@ -16,16 +16,11 @@ struct zBin_file{
|
|||
int i_octet; //indice dansl'octet
|
||||
int nb_octets; //Nb octet lis/écrit
|
||||
|
||||
};
|
||||
typedef struct zBin_file Bin_file;
|
||||
typedef struct zBin_file pBin_file;
|
||||
}Bin_file;
|
||||
|
||||
Bin_file *Ouv_bit(char *p,char mode);
|
||||
|
||||
void Ec_Bit(Bin_file *output,char bit);
|
||||
|
||||
char Lec_Bit(Bin_file*input);
|
||||
|
||||
int Ferm_Bit(Bin_file *fichier);
|
||||
|
||||
#endif
|
||||
Reference in a new issue