2008-08-06 03:55:59 +02:00
|
|
|
/****************************************************************************
|
2008-09-12 07:28:40 +02:00
|
|
|
* Snes9x 1.51 Nintendo Wii/Gamecube Port
|
2008-08-06 03:55:59 +02:00
|
|
|
*
|
|
|
|
* softdev July 2006
|
2008-10-15 08:35:14 +02:00
|
|
|
* Michniewski 2008
|
2008-09-12 07:28:40 +02:00
|
|
|
* Tantric September 2008
|
|
|
|
*
|
|
|
|
* unzip.h
|
|
|
|
*
|
|
|
|
* File unzip routines
|
2008-08-06 03:55:59 +02:00
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _UNZIP_
|
|
|
|
#define _UNZIP_
|
|
|
|
|
2008-08-22 04:47:08 +02:00
|
|
|
#include <smb.h>
|
|
|
|
|
2008-08-06 03:55:59 +02:00
|
|
|
extern int IsZipFile (char *buffer);
|
2008-10-05 23:56:18 +02:00
|
|
|
char * GetFirstZipFilename(int method);
|
2008-10-14 11:21:34 +02:00
|
|
|
int UnZipBuffer (unsigned char *outbuffer, int method);
|
|
|
|
int SzParse(char * filepath, int method);
|
|
|
|
int SzExtractFile(int i, unsigned char *buffer);
|
|
|
|
void SzClose();
|
2008-08-22 04:47:08 +02:00
|
|
|
|
2008-08-06 03:55:59 +02:00
|
|
|
/*
|
|
|
|
* Zip file header definition
|
|
|
|
*/
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
unsigned int zipid __attribute__ ((__packed__)); // 0x04034b50
|
|
|
|
unsigned short zipversion __attribute__ ((__packed__));
|
|
|
|
unsigned short zipflags __attribute__ ((__packed__));
|
|
|
|
unsigned short compressionMethod __attribute__ ((__packed__));
|
|
|
|
unsigned short lastmodtime __attribute__ ((__packed__));
|
|
|
|
unsigned short lastmoddate __attribute__ ((__packed__));
|
|
|
|
unsigned int crc32 __attribute__ ((__packed__));
|
|
|
|
unsigned int compressedSize __attribute__ ((__packed__));
|
|
|
|
unsigned int uncompressedSize __attribute__ ((__packed__));
|
|
|
|
unsigned short filenameLength __attribute__ ((__packed__));
|
|
|
|
unsigned short extraDataLength __attribute__ ((__packed__));
|
|
|
|
}
|
|
|
|
PKZIPHEADER;
|
|
|
|
|
|
|
|
u32 FLIP32 (u32 b);
|
|
|
|
u16 FLIP16 (u16 b);
|
|
|
|
|
|
|
|
#endif
|