2020-05-05 18:22:29 +00:00
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
COPYRIGHT(C) 2004 hardkoder@gmail.com / http://www.kipple.pe.kr
|
2020-05-05 18:22:31 +00:00
|
|
|
|
|
2020-05-05 18:22:29 +00:00
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD>۱<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
|
|
|
|
|
- <EFBFBD><EFBFBD> <EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>մϴ<EFBFBD>.
|
|
|
|
|
- <EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϰų<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD> <EFBFBD>ȵ<EFBFBD>.
|
|
|
|
|
- <EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ã<EFBFBD>Ұų<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>̿<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˷<EFBFBD><EFBFBD>ָ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﲬ..
|
|
|
|
|
- <EFBFBD>ڽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˷<EFBFBD><EFBFBD>ָ<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ҳ<EFBFBD>..
|
|
|
|
|
|
|
|
|
|
<EFBFBD>ҽ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
|
|
|
|
|
- .ALZ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
- ALZ<EFBFBD><EFBFBD> BZIP2<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѱ<EFBFBD> <EFBFBD>ƴϰ<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CRC <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<EFBFBD>⸦ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD>,
|
|
|
|
|
DEFLATE <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˰<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ZIP<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
( bzip2 <EFBFBD><EFBFBD> 4.9x <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD>, deflate <EFBFBD><EFBFBD> 5.x <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD>. 5.x <EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> bzip2<EFBFBD><EFBFBD> <EFBFBD>ʹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
|
|
|
|
- UnAlzBz2decompress.c <EFBFBD><EFBFBD> UnAlzbzlib.c <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bzip2 <EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> alz <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
( deflate <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȵǾ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>׳<EFBFBD> zlib <EFBFBD><EFBFBD> <EFBFBD>ᵵ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.. bzip2 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ǿ
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bzip2 <EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>״<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȵȴ<EFBFBD>. )
|
|
|
|
|
- <EFBFBD><EFBFBD> <EFBFBD>ҽ<EFBFBD><EFBFBD><EFBFBD> 4ĭ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
|
|
|
|
|
2004/02/06 - http://www.wotsit.org/ <20><><EFBFBD><EFBFBD> ZIP File Format Specification version 4.5 [PKWARE Inc.] <20><>
|
|
|
|
|
<EFBFBD>ٿ<EFBFBD><EFBFBD>ε<EFBFBD> <EFBFBD>Ƽ<EFBFBD> <EFBFBD>м<EFBFBD>.
|
|
|
|
|
2004/02/07 - <EFBFBD><EFBFBD>ť<EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD> unzip Ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
2004/02/08 - unzip Ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> alzip <EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>߾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ʈ
|
|
|
|
|
- deflate, rawdata <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
- <EFBFBD><EFBFBD><EFBFBD>̾˷α<EFBFBD> <EFBFBD>ڽ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
2004/02/08 - bzip2 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
2004/03/01 - bzip2 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ϻ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ҭ
|
|
|
|
|
- callback <EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|
|
|
|
2004/03/07 - <EFBFBD><EFBFBD>ƿ <EFBFBD>Լ<EFBFBD> <EFBFBD>߰<EFBFBD> ( ExtractCurrentFileToBuf() )
|
|
|
|
|
2004/10/03 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>߰<EFBFBD> ( FILE I/O <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2020-05-05 18:22:31 +00:00
|
|
|
|
- 2GB <EFBFBD>̻<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> (WINDOWS ONLY)
|
|
|
|
|
2004/10/22 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD>(BSD/LINUX)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
( BSD/LINUX <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2GB <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
|
|
|
|
2004/10/23 - by xxfree86 : DARWIN <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>θ<EFBFBD><EFBFBD><EFBFBD> "\\" <EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
2004/10/24 - by aqua0125 : <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯó<EFBFBD><EFBFBD>, 64bit <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD>
|
|
|
|
|
- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ҽ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
2004/10/25 - by yongari : __LP64__ , <EFBFBD><EFBFBD><EFBFBD><EFBFBD>(le64toh/le132oh/le16toh) <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>̽<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
2004/10/26 - BSD/LINUX : byte-order, libiconv <EFBFBD>̽<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2020-05-05 18:22:33 +00:00
|
|
|
|
2004/10/30 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD> & <EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
2020-05-05 18:22:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> : ( * ǥ<EFBFBD><EFBFBD> <EFBFBD>Ѱ<EFBFBD> )
|
|
|
|
|
- bzip2 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
- UI <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ( PROGRESS, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ) *
|
|
|
|
|
- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
2020-05-05 18:22:29 +00:00
|
|
|
|
- <EFBFBD><EFBFBD>ȣ <EFBFBD>ɸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
- <EFBFBD>ջ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ʈ
|
|
|
|
|
- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> CRC üũ
|
|
|
|
|
|
2020-05-05 18:22:31 +00:00
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ɼ<EFBFBD> ( -DXXXX )
|
|
|
|
|
- _WIN32 : WIN32
|
|
|
|
|
- _UNALZ_ICONV : iconv <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> code <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
- _UNALZ_UTF8 : _UNALZ_ICONV <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⺻ <EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "UTF-8" <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2020-05-05 18:22:29 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _UNALZ_H_
|
|
|
|
|
#define _UNALZ_H_
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <string>
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef INT64
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
# define INT64 __int64
|
|
|
|
|
#else
|
|
|
|
|
# define INT64 long long
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-05-05 18:22:31 +00:00
|
|
|
|
#ifndef UINT64
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
# define UINT64 unsigned __int64
|
|
|
|
|
#else
|
|
|
|
|
# define UINT64 unsigned long long
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef UINT32
|
|
|
|
|
typedef unsigned int UINT32;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef UINT16
|
|
|
|
|
typedef unsigned short UINT16;
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-05-05 18:22:29 +00:00
|
|
|
|
#ifndef SHORT
|
|
|
|
|
typedef short SHORT;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef BYTE
|
|
|
|
|
typedef unsigned char BYTE;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef CHAR
|
|
|
|
|
typedef char CHAR;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef BYTE
|
|
|
|
|
typedef unsigned char BYTE;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef UINT
|
|
|
|
|
typedef unsigned int UINT;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef LONG
|
|
|
|
|
typedef long LONG;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef BOOL
|
|
|
|
|
typedef int BOOL;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef FALSE
|
|
|
|
|
# define FALSE 0
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef TRUE
|
|
|
|
|
# define TRUE 1
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef LPCTSTR
|
|
|
|
|
typedef const char* LPCSTR;
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef HANDLE
|
|
|
|
|
# ifdef _WIN32
|
|
|
|
|
typedef void *HANDLE;
|
|
|
|
|
# else
|
|
|
|
|
typedef FILE *HANDLE;
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef ASSERT
|
|
|
|
|
# include <assert.h>
|
2020-05-05 18:22:33 +00:00
|
|
|
|
//# define ASSERT(x) assert(x)
|
|
|
|
|
# define ASSERT(x) {printf("assert file:%s line:%d\n", __FILE__, __LINE__);}
|
2020-05-05 18:22:29 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace UNALZ
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
# pragma pack(push, UNALZ, 1) // structure packing
|
|
|
|
|
#else
|
|
|
|
|
# pragma pack(1)
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-05-05 18:22:33 +00:00
|
|
|
|
static const char UNALZ_VERSION[] = "CUnAlz0.23";
|
2020-05-05 18:22:29 +00:00
|
|
|
|
static const char UNALZ_COPYRIGHT[] = "Copyright(C) 2004 hardkoder@gmail.com";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// <20><> <20><><EFBFBD><EFBFBD> <20><>..
|
|
|
|
|
struct SAlzHeader
|
|
|
|
|
{
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 unknown; // ??
|
2020-05-05 18:22:29 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
union _UGeneralPurposeBitFlag // zip <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|
|
|
|
{
|
|
|
|
|
SHORT data;
|
|
|
|
|
struct
|
|
|
|
|
{
|
|
|
|
|
BYTE bit0 : 1;
|
|
|
|
|
BYTE bit1 : 1;
|
|
|
|
|
BYTE bit2 : 1;
|
|
|
|
|
BYTE bit3 : 1;
|
|
|
|
|
BYTE bit4 : 1;
|
|
|
|
|
BYTE bit5 : 1;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
enum COMPRESSION_METHOD ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|
|
|
|
{
|
|
|
|
|
COMP_NOCOMP = 0,
|
|
|
|
|
COMP_BZIP2 = 1,
|
|
|
|
|
COMP_DEFLATE = 2,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct _SLocalFileHeaderHead ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
|
|
|
|
SHORT fileNameLength;
|
|
|
|
|
BYTE unknown[5]; ///< ???
|
|
|
|
|
BYTE fileSizeByte; ///< <20><><EFBFBD><EFBFBD> ũ<><C5A9> <20>ʵ<EFBFBD><CAB5><EFBFBD> ũ<><C5A9> : 0x10, 0x20, 0x40, 0x80 <20><><EFBFBD><EFBFBD> 1byte, 2byte, 4byte, 8byte
|
|
|
|
|
BYTE unknown2[1]; ///< ???
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
SHORT versionNeededToExtract;
|
|
|
|
|
_UGeneralPurposeBitFlag generalPurposeBitFlag;
|
|
|
|
|
SHORT compressionMethod;
|
|
|
|
|
SHORT lastModFileTime;
|
|
|
|
|
SHORT lastModFileDate;
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 crc32;
|
|
|
|
|
UINT32 compressedSize;
|
|
|
|
|
UINT32 uncompressedSize;
|
2020-05-05 18:22:29 +00:00
|
|
|
|
SHORT fileNameLength;
|
|
|
|
|
SHORT extraFieldLength;
|
|
|
|
|
*/
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct _SDataDescriptor
|
|
|
|
|
{
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 crc32;
|
|
|
|
|
UINT32 compressed;
|
|
|
|
|
UINT32 uncompressed;
|
2020-05-05 18:22:29 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct SLocalFileHeader
|
|
|
|
|
{
|
|
|
|
|
SLocalFileHeader() { memset(this, 0, sizeof(*this)); }
|
|
|
|
|
//~SLocalFileHeader() { if(fileName) free(fileName); if(extraField) free(extraField); }
|
|
|
|
|
void Clear() { if(fileName) free(fileName); fileName=NULL; if(extraField) free(extraField);extraField=NULL; }
|
|
|
|
|
_SLocalFileHeaderHead head;
|
|
|
|
|
|
|
|
|
|
BYTE compressionMethod; ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> : 2 - deflate, 1 - bzip2(?), 0 - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
BYTE unknown3[1]; ///< ???
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 maybeCRC; ///< <20>Ƹ<EFBFBD><C6B8><EFBFBD> crc
|
2020-05-05 18:22:29 +00:00
|
|
|
|
|
|
|
|
|
INT64 compressedSize;
|
|
|
|
|
INT64 uncompressedSize;
|
|
|
|
|
|
|
|
|
|
CHAR* fileName;
|
|
|
|
|
BYTE* extraField;
|
|
|
|
|
_SDataDescriptor dataDescriptor;
|
|
|
|
|
INT64 dwFileDataPos; ///< file data <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ..
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct _SCentralDirectoryStructureHead
|
|
|
|
|
{
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 dwUnknown; ///< <20><EFBFBD> NULL <20>̴<EFBFBD><CCB4><EFBFBD>..
|
|
|
|
|
UINT32 dwMaybeCRC; ///< <20>Ƹ<EFBFBD><C6B8><EFBFBD> crc
|
|
|
|
|
UINT32 dwCLZ03; ///< "CLZ0x03" - 0x035a4c43 <20><><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD>ϴµ<CFB4>.
|
2020-05-05 18:22:29 +00:00
|
|
|
|
/*
|
|
|
|
|
SHORT versionMadeBy;
|
|
|
|
|
SHORT versionNeededToExtract;
|
|
|
|
|
_UGeneralPurposeBitFlag generalPurposeBitFlag;
|
|
|
|
|
SHORT compressionMethod;
|
|
|
|
|
SHORT lastModFileTime;
|
|
|
|
|
SHORT lastModFileDate;
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 crc32;
|
|
|
|
|
UINT32 compressedSize;
|
|
|
|
|
UINT32 uncompressedSize;
|
2020-05-05 18:22:29 +00:00
|
|
|
|
SHORT fileNameLength;
|
|
|
|
|
SHORT extraFieldLength;
|
|
|
|
|
SHORT fileCommentLength;
|
|
|
|
|
SHORT diskNumberStart;
|
|
|
|
|
SHORT internalFileAttributes;
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 externalFileAttributes;
|
|
|
|
|
UINT32 relativeOffsetOfLocalHeader;
|
2020-05-05 18:22:29 +00:00
|
|
|
|
*/
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct SCentralDirectoryStructure
|
|
|
|
|
{
|
|
|
|
|
SCentralDirectoryStructure() { memset(this, 0, sizeof(*this)); }
|
|
|
|
|
//~SCentralDirectoryStructure() { if(fileName) free(fileName); if(extraField) free(extraField);if(fileComment)free(fileComment); }
|
|
|
|
|
_SCentralDirectoryStructureHead head;
|
|
|
|
|
/*
|
|
|
|
|
CHAR* fileName;
|
|
|
|
|
BYTE* extraField;
|
|
|
|
|
CHAR* fileComment;
|
|
|
|
|
*/
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
struct _SEndOfCentralDirectoryRecordHead
|
|
|
|
|
{
|
|
|
|
|
SHORT numberOfThisDisk;
|
|
|
|
|
SHORT numberOfTheDiskWithTheStartOfTheCentralDirectory;
|
|
|
|
|
SHORT centralDirectoryOnThisDisk;
|
|
|
|
|
SHORT totalNumberOfEntriesInTheCentralDirectoryOnThisDisk;
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 sizeOfTheCentralDirectory;
|
|
|
|
|
UINT32 offsetOfStartOfCentralDirectoryWithREspectoTotheStartingDiskNumber;
|
2020-05-05 18:22:29 +00:00
|
|
|
|
SHORT zipFileCommentLength;
|
|
|
|
|
};
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
struct SEndOfCentralDirectoryRecord
|
|
|
|
|
{
|
|
|
|
|
SEndOfCentralDirectoryRecord() { memset(this, 0, sizeof(*this)); }
|
|
|
|
|
~SEndOfCentralDirectoryRecord() { if(fileComment) free(fileComment); }
|
|
|
|
|
_SEndOfCentralDirectoryRecordHead head;
|
|
|
|
|
CHAR* fileComment;
|
|
|
|
|
};
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
2020-05-05 18:22:31 +00:00
|
|
|
|
# pragma pack(pop, UNALZ) ///< PACKING <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2020-05-05 18:22:29 +00:00
|
|
|
|
#else
|
2020-05-05 18:22:31 +00:00
|
|
|
|
# ifdef __LP64__ // 63bit <20><> 8byte <20>³<EFBFBD> ? <20>߸ڴ<F0B8A3B0>..
|
|
|
|
|
# pragma pack(8)
|
|
|
|
|
# else
|
|
|
|
|
# pragma pack(4)
|
|
|
|
|
# endif
|
2020-05-05 18:22:29 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///< PROGRESS CALLBACK FUNCTION - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ȳ<EFBFBD><C8B2> <20>˰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̰<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ȴ<EFBFBD>.
|
|
|
|
|
typedef void (_UnAlzCallback)(const char* szMessage, INT64 nCurrent, INT64 nRange, void* param, BOOL* bHalt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CUnAlz
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CUnAlz();
|
|
|
|
|
~CUnAlz();
|
|
|
|
|
BOOL Open(const char* szPathName);
|
|
|
|
|
void Close();
|
|
|
|
|
BOOL SetCurrentFile(const char* szFileName);
|
|
|
|
|
BOOL ExtractCurrentFile(const char* szDestPathName, const char* szDestFileName=NULL);
|
|
|
|
|
BOOL ExtractCurrentFileToBuf(BYTE* pDestBuf, int nBufSize);
|
|
|
|
|
BOOL ExtractAll(const char* szDestPathName);
|
|
|
|
|
void SetCallback(_UnAlzCallback* pFunc, void* param=NULL);
|
|
|
|
|
|
2020-05-05 18:22:31 +00:00
|
|
|
|
#ifdef _UNALZ_ICONV
|
|
|
|
|
void SetDestCodepage(const char* szToCodepage) { strcpy(m_szToCodepage, szToCodepage); }
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-05-05 18:22:29 +00:00
|
|
|
|
public : ///< WIN32 <20><><EFBFBD><EFBFBD> ( UNICODE ó<><C3B3><EFBFBD><EFBFBD> )
|
2020-05-05 18:22:31 +00:00
|
|
|
|
|
2020-05-05 18:22:29 +00:00
|
|
|
|
#ifdef _WIN32
|
2020-05-05 18:22:31 +00:00
|
|
|
|
#ifndef __GNUWIN32__
|
|
|
|
|
#ifndef LPCWSTR
|
|
|
|
|
typedef const wchar_t* LPCWSTR;
|
|
|
|
|
#endif
|
2020-05-05 18:22:29 +00:00
|
|
|
|
BOOL Open(LPCWSTR szPathName);
|
|
|
|
|
BOOL SetCurrentFile(LPCWSTR szFileName);
|
|
|
|
|
static BOOL IsFolder(LPCWSTR szPathName);
|
2020-05-05 18:22:31 +00:00
|
|
|
|
#endif // __GNUWIN32__
|
|
|
|
|
#endif // _WIN32
|
2020-05-05 18:22:29 +00:00
|
|
|
|
|
|
|
|
|
public :
|
|
|
|
|
typedef vector<SLocalFileHeader> FileList; ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
const FileList& GetFileList() { return m_fileList; }; ///< file <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
FileList::iterator GetCurFileHeader() { return m_posCur; }; ///< <20><><EFBFBD><EFBFBD> (SetCurrentFile() <20><> <20><><EFBFBD>õ<EFBFBD>) <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2020-05-05 18:22:31 +00:00
|
|
|
|
// const SLocalFileHeader* GetCurFileHeader() { return m_posCur; }; ///< <20><><EFBFBD><EFBFBD> (SetCurrentFile() <20><> <20><><EFBFBD>õ<EFBFBD>) <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2020-05-05 18:22:29 +00:00
|
|
|
|
|
|
|
|
|
public :
|
|
|
|
|
enum ERR ///< <20><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD> - <20><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD>..
|
|
|
|
|
{
|
|
|
|
|
ERR_NOERR,
|
|
|
|
|
ERR_CANT_OPEN_FILE, ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
ERR_CANT_READ_SIG, ///< signature <20>б<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
ERR_CANT_READ_FILE,
|
|
|
|
|
|
|
|
|
|
ERR_AT_READ_HEADER,
|
|
|
|
|
ERR_INVALID_FILENAME_LENGTH,
|
|
|
|
|
ERR_INVALID_EXTRAFIELD_LENGTH,
|
|
|
|
|
ERR_CANT_READ_CENTRAL_DIRECTORY_STRUCTURE_HEAD,
|
|
|
|
|
ERR_INVALID_FILENAME_SIZE,
|
|
|
|
|
ERR_INVALID_EXTRAFIELD_SIZE,
|
|
|
|
|
ERR_INVALID_FILECOMMENT_SIZE,
|
|
|
|
|
ERR_CANT_READ_HEADER,
|
|
|
|
|
ERR_MEM_ALLOC_FAILED,
|
|
|
|
|
ERR_FILE_READ_ERROR,
|
|
|
|
|
ERR_INFLATE_FAILED,
|
2020-05-05 18:22:31 +00:00
|
|
|
|
|
|
|
|
|
ERR_ICONV_CANT_OPEN,
|
|
|
|
|
ERR_ICONV_INVALID_MULTISEQUENCE_OF_CHARACTERS,
|
|
|
|
|
ERR_ICONV_INCOMPLETE_MULTIBYTE_SEQUENCE,
|
|
|
|
|
ERR_ICONV_NOT_ENOUGH_SPACE_OF_BUFFER_TO_CONVERT,
|
|
|
|
|
ERR_ICONV_ETC,
|
|
|
|
|
|
2020-05-05 18:22:29 +00:00
|
|
|
|
};
|
|
|
|
|
ERR GetLastErr(){return m_nErr;}
|
2020-05-05 18:22:31 +00:00
|
|
|
|
const char* GetLastErrStr(){return LastErrToStr(m_nErr);}
|
|
|
|
|
const char* LastErrToStr(ERR nERR);
|
2020-05-05 18:22:29 +00:00
|
|
|
|
|
2020-05-05 18:22:31 +00:00
|
|
|
|
enum SIGNATURE ///< zip file signature - little endian
|
2020-05-05 18:22:29 +00:00
|
|
|
|
{
|
2020-05-05 18:22:31 +00:00
|
|
|
|
SIG_ERROR = 0x00,
|
2020-05-05 18:22:29 +00:00
|
|
|
|
SIG_EOF = 0x01,
|
|
|
|
|
SIG_ALZ_FILE_HEADER = 0x015a4c41, ///< ALZ 0x01
|
|
|
|
|
SIG_LOCAL_FILE_HEADER = 0x015a4c42, ///< BLZ 0x01
|
|
|
|
|
SIG_CENTRAL_DIRECTORY_STRUCTURE = 0x015a4c43, ///< CLZ 0x01
|
|
|
|
|
SIG_ENDOF_CENTRAL_DIRECTORY_RECORD = 0x025a4c43, ///< CLZ 0x02
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public :
|
|
|
|
|
static BOOL DigPath(const char* szPathName);
|
|
|
|
|
static BOOL IsFolder(LPCSTR szPathName);
|
|
|
|
|
static const char* GetVersion() { return UNALZ_VERSION; }
|
|
|
|
|
static const char* GetCopyright() { return UNALZ_COPYRIGHT; }
|
|
|
|
|
|
|
|
|
|
private :
|
|
|
|
|
SIGNATURE ReadSignature();
|
|
|
|
|
BOOL ReadAlzFileHeader();
|
|
|
|
|
BOOL ReadLocalFileheader();
|
|
|
|
|
BOOL ReadCentralDirectoryStructure();
|
|
|
|
|
BOOL ReadEndofCentralDirectoryRecord();
|
|
|
|
|
|
|
|
|
|
private :
|
|
|
|
|
enum EXTRACT_TYPE ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ÿ<><C5B8>.
|
|
|
|
|
{
|
|
|
|
|
ET_FILE, ///< FILE*
|
|
|
|
|
ET_MEM, ///< memory buffer
|
|
|
|
|
};
|
|
|
|
|
struct SExtractDest ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
|
|
|
|
SExtractDest() { memset(this, 0, sizeof(SExtractDest)); }
|
|
|
|
|
EXTRACT_TYPE nType; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD> <20><EFBFBD><DEB8><EFBFBD> <20>ΰ<EFBFBD>..
|
|
|
|
|
FILE* fp; ///< ET_FILE <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> FILE*
|
|
|
|
|
BYTE* buf; ///< ET_MEM <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2020-05-05 18:22:31 +00:00
|
|
|
|
UINT32 bufsize; ///< ET_MEM <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9>
|
|
|
|
|
UINT32 bufpos; ///< ET_MEM <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ۿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><>ġ
|
2020-05-05 18:22:29 +00:00
|
|
|
|
};
|
|
|
|
|
int WriteToDest(SExtractDest* dest, BYTE* buf, int nSize);
|
|
|
|
|
|
|
|
|
|
private :
|
|
|
|
|
BOOL ExtractTo(SExtractDest* dest);
|
|
|
|
|
|
|
|
|
|
//BOOL ExtractDeflate(FILE* fp, SLocalFileHeader& file);
|
|
|
|
|
//BOOL ExtractBzip2_bak(FILE* fp, SLocalFileHeader& file); - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>߸<EFBFBD><DFB8><EFBFBD>) <20><><EFBFBD><EFBFBD>
|
|
|
|
|
BOOL ExtractDeflate2(SExtractDest* dest, SLocalFileHeader& file);
|
|
|
|
|
BOOL ExtractBzip2(SExtractDest* dest, SLocalFileHeader& file);
|
|
|
|
|
BOOL ExtractRawfile(SExtractDest* dest, SLocalFileHeader& file);
|
|
|
|
|
|
|
|
|
|
private : // bzip2 <20><><EFBFBD><EFBFBD> ó<><C3B3> <20>Լ<EFBFBD>..
|
|
|
|
|
typedef void MYBZFILE;
|
|
|
|
|
MYBZFILE* BZ2_bzReadOpen(int* bzerror, CUnAlz* f, int verbosity, int _small, void* unused, int nUnused);
|
|
|
|
|
int BZ2_bzread(MYBZFILE* b, void* buf, int len );
|
|
|
|
|
int BZ2_bzRead(int* bzerror, MYBZFILE* b, void* buf, int len);
|
|
|
|
|
void BZ2_bzReadClose( int *bzerror, MYBZFILE *b );
|
|
|
|
|
|
|
|
|
|
private : // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(lapper?) Ŭ<><C5AC><EFBFBD><EFBFBD>
|
|
|
|
|
BOOL FOpen(const char* szPathName);
|
|
|
|
|
void FClose();
|
|
|
|
|
INT64 FTell();
|
|
|
|
|
BOOL FEof();
|
|
|
|
|
BOOL FSeek(INT64 offset);
|
2020-05-05 18:22:31 +00:00
|
|
|
|
BOOL FRead(void* buffer, UINT32 nBytesToRead, int* pTotRead=NULL);
|
2020-05-05 18:22:29 +00:00
|
|
|
|
|
|
|
|
|
enum {MAX_FILES=1000}; ///< ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>.
|
|
|
|
|
enum {MULTIVOL_TAIL_SIZE=16,MULTIVOL_HEAD_SIZE=8}; ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ö<EFBFBD><C3B6><EFBFBD>, <20><><EFBFBD><EFBFBD> ũ<><C5A9>
|
|
|
|
|
struct SFile ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
HANDLE fp;
|
|
|
|
|
INT64 nFileSize;
|
|
|
|
|
int nMultivolHeaderSize;
|
|
|
|
|
int nMultivolTailSize;
|
|
|
|
|
};
|
|
|
|
|
|
2020-05-05 18:22:31 +00:00
|
|
|
|
SFile m_files[MAX_FILES]; ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> array - <20><><EFBFBD><EFBFBD><EFBFBD>Ѱ<EFBFBD>?
|
|
|
|
|
int m_nCurFile; ///< m_files <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ.
|
|
|
|
|
int m_nFileCount; ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|
|
|
|
INT64 m_nVirtualFilePos; ///< <20><>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ
|
|
|
|
|
INT64 m_nCurFilePos; ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ.
|
|
|
|
|
BOOL m_bIsEOF; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>) <20>Գ<EFBFBD>?
|
2020-05-05 18:22:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private :
|
2020-05-05 18:22:31 +00:00
|
|
|
|
FileList m_fileList; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2020-05-05 18:22:29 +00:00
|
|
|
|
ERR m_nErr;
|
2020-05-05 18:22:31 +00:00
|
|
|
|
FileList::iterator m_posCur; ///< <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2020-05-05 18:22:29 +00:00
|
|
|
|
_UnAlzCallback* m_pFuncCallBack;
|
|
|
|
|
void* m_pCallbackParam;
|
|
|
|
|
BOOL m_bHalt;
|
2020-05-05 18:22:31 +00:00
|
|
|
|
|
|
|
|
|
#ifdef _UNALZ_ICONV
|
|
|
|
|
char m_szToCodepage[256]; ///< codepage
|
|
|
|
|
char m_szFromCodepage[256]; ///< "CP949"
|
|
|
|
|
#endif
|
2020-05-05 18:22:29 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
using namespace UNALZ;
|
|
|
|
|
|
|
|
|
|
#endif
|