#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include "unzip.h"
#include "graphics.h"

#define UNZIP_OK 		0
#define UNZIP_ERROPEN 		1
#define UNZIP_ERRNOTFOUND 	2
#define UNZIP_ERRCREATE 	3
#define UNZIP_ERRREAD 		4
#define UNZIP_ERRWRITE 		5


typedef struct _imglist {
        char name[256];
        int refcount;
        Image *img;
        struct _imglist *next;
} IMGLIST;

int unzipFile( char* zipfile, char* filename, char* outfile );
void closezipfile();
Image *loadfromzip(char *filename, char * zipfile);
Image *loadfromzip_check4blank(char *filename, char * zipfile);
Image *loadfromdir(char *filename );
Image *loadfromdir_check4blank(char *filename );
void imglist_garbagecollect();
void unloadmap(char *filename);
Image *loadfromcache(char *filename );
void unload_group (int zoom, char* zipfile);
int unzipReadDir( char* zipfile, char options[][60]);
