1234567891011121314151617181920212223242526272829303132333435 |
- #include "StdAfx.h"
- #include "MemZipFile.h"
- #include "..\ZLibWrapLib\Encoding.h"
- #include "io_mfc_mem.h"
- #define ZIP_GPBF_LANGUAGE_ENCODING_FLAG 0x800
- CMemZipFile::CMemZipFile(void):m_file(NULL)
- {
- fill_mfc_mem_filefunc(&m_pzlib_filefunc_def);
- m_file_inzip_open =FALSE;
- }
- CMemZipFile::CMemZipFile( CMemFile * pMemFile ):m_file(NULL)
- {
- fill_mfc_mem_filefunc(&m_pzlib_filefunc_def);
- m_file_inzip_open =FALSE;
- if(pMemFile!=NULL)OpenFile(pMemFile);
- }
- CMemZipFile::~CMemZipFile(void)
- {
- }
- void CMemZipFile::OpenFile( CMemFile* file )
- {
- m_file =file;
- m_pzlib_filefunc_def.opaque = m_file;
- zf=zipOpen2(NULL,0,NULL,&m_pzlib_filefunc_def);
- }
- void CMemZipFile::Open()
- {
- if(!m_IsZipOpened&& NULL!=m_file)OpenFile(m_file);
- }
|