NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
TZip Class Reference
Collaboration diagram for TZip:

Public Member Functions

 TZip (const char *pwd)
 
 ~TZip ()
 
ZRESULT Create (void *z, unsigned int len, DWORD flags)
 
unsigned int write (const char *buf, unsigned int size)
 
bool oseek (unsigned int pos)
 
ZRESULT GetMemory (void **pbuf, unsigned long *plen)
 
ZRESULT Close ()
 
ZRESULT open_file (const TCHAR *fn)
 
ZRESULT open_handle (HANDLE hf, unsigned int len)
 
ZRESULT open_mem (void *src, unsigned int len)
 
ZRESULT open_dir ()
 
unsigned read (char *buf, unsigned size)
 
ZRESULT iclose ()
 
ZRESULT ideflate (TZipFileInfo *zfi)
 
ZRESULT istore ()
 
ZRESULT Add (const TCHAR *odstzn, void *src, unsigned int len, DWORD flags)
 
ZRESULT AddCentral ()
 

Static Public Member Functions

static unsigned sflush (void *param, const char *buf, unsigned *size)
 
static unsigned swrite (void *param, const char *buf, unsigned size)
 
static unsigned sread (TState &s, char *buf, unsigned size)
 

Public Attributes

char * password
 
HANDLE hfout
 
bool mustclosehfout
 
HANDLE hmapout
 
unsigned ooffset
 
ZRESULT oerr
 
unsigned writ
 
bool ocanseek
 
char * obuf
 
unsigned int opos
 
unsigned int mapsize
 
bool hasputcen
 
bool encwriting
 
unsigned long keys [3]
 
char * encbuf
 
unsigned int encbufsize
 
TZipFileInfozfis
 
TStatestate
 
ulg attr
 
iztimes times
 
ulg timestamp
 
bool iseekable
 
long isize
 
long ired
 
ulg crc
 
HANDLE hfin
 
bool selfclosehf
 
const char * bufin
 
unsigned int lenin
 
unsigned int posin
 
ulg csize
 
char buf [16384]
 

Detailed Description

Definition at line 2444 of file zip.cpp.

Constructor & Destructor Documentation

◆ TZip()

TZip::TZip ( const char *  pwd)
inline

Definition at line 2447 of file zip.cpp.

References password.

◆ ~TZip()

TZip::~TZip ( )
inline

Definition at line 2455 of file zip.cpp.

References encbuf, password, and state.

Member Function Documentation

◆ Add()

◆ AddCentral()

ZRESULT TZip::AddCentral ( )

Definition at line 3106 of file zip.cpp.

References CENHEAD, ENDHEAD, if(), zlist::nxt, ooffset, putcentral(), putend(), swrite(), writ, ZE_OK, zfis, ZR_OK, and ZR_WRITE.

Referenced by Close(), and GetMemory().

Here is the call graph for this function:

◆ Close()

ZRESULT TZip::Close ( )

Definition at line 2687 of file zip.cpp.

References AddCentral(), hasputcen, hfout, hmapout, mustclosehfout, obuf, and ZR_OK.

Referenced by CloseZipZ().

Here is the call graph for this function:

◆ Create()

ZRESULT TZip::Create ( void *  z,
unsigned int  len,
DWORD  flags 
)

◆ GetMemory()

ZRESULT TZip::GetMemory ( void **  pbuf,
unsigned long *  plen 
)

Definition at line 2674 of file zip.cpp.

References AddCentral(), hasputcen, obuf, writ, ZR_NOTMMAP, and ZR_OK.

Referenced by ZipGetMemory().

Here is the call graph for this function:

◆ iclose()

ZRESULT TZip::iclose ( )

Definition at line 2856 of file zip.cpp.

References hfin, ired, isize, selfclosehf, ZR_MISSIZE, and ZR_OK.

Referenced by Add().

◆ ideflate()

ZRESULT TZip::ideflate ( TZipFileInfo zfi)

Definition at line 2868 of file zip.cpp.

References zlist::att, bi_init(), buf, csize, ct_init(), deflate(), ct_data::dl, TState::ds, TState::err, zlist::flg, TState::flush_outbuf, iseekable, ct_data::len, TState::level, lm_init(), TState::param, TState::readfunc, TState::seekable, sflush(), sread(), state, TTreeState::static_dtree, TRUE, TState::ts, TDeflateState::window_size, ZR_FLATE, and ZR_OK.

Referenced by Add().

Here is the call graph for this function:

◆ istore()

ZRESULT TZip::istore ( )

Definition at line 2896 of file zip.cpp.

References buf, csize, EOF, read(), write(), ZR_MISSIZE, and ZR_OK.

Referenced by Add().

Here is the call graph for this function:

◆ open_dir()

ZRESULT TZip::open_dir ( )

Definition at line 2795 of file zip.cpp.

References iztimes::atime, attr, bufin, crc, CRCVAL_INITIAL, csize, iztimes::ctime, filetime2dosdatetime(), filetime2timet(), hfin, ired, iseekable, isize, iztimes::mtime, selfclosehf, times, timestamp, and ZR_OK.

Referenced by Add().

Here is the call graph for this function:

◆ open_file()

ZRESULT TZip::open_file ( const TCHAR *  fn)

Definition at line 2707 of file zip.cpp.

References bufin, crc, CRCVAL_INITIAL, csize, hfin, ired, isize, open_handle(), selfclosehf, ZR_ARGS, ZR_NOFILE, and ZR_OK.

Referenced by Add().

Here is the call graph for this function:

◆ open_handle()

ZRESULT TZip::open_handle ( HANDLE  hf,
unsigned int  len 
)

Definition at line 2728 of file zip.cpp.

References iztimes::atime, attr, bufin, crc, CRCVAL_INITIAL, csize, iztimes::ctime, filetime2dosdatetime(), filetime2timet(), GetFileInfo(), hfin, hfout, ired, iseekable, isize, iztimes::mtime, selfclosehf, times, timestamp, ZR_ARGS, and ZR_OK.

Referenced by Add(), and open_file().

Here is the call graph for this function:

◆ open_mem()

ZRESULT TZip::open_mem ( void *  src,
unsigned int  len 
)

Definition at line 2768 of file zip.cpp.

References iztimes::atime, attr, bufin, crc, CRCVAL_INITIAL, csize, iztimes::ctime, filetime2dosdatetime(), filetime2timet(), hfin, ired, iseekable, isize, lenin, iztimes::mtime, posin, selfclosehf, times, timestamp, ZR_ARGS, and ZR_OK.

Referenced by Add().

Here is the call graph for this function:

◆ oseek()

bool TZip::oseek ( unsigned int  pos)

Definition at line 2648 of file zip.cpp.

References hfout, mapsize, obuf, ocanseek, oerr, ooffset, opos, ZR_MEMSIZE, ZR_NOTINITED, and ZR_SEEK.

Referenced by Add().

◆ read()

unsigned TZip::read ( char *  buf,
unsigned  size 
)

Definition at line 2827 of file zip.cpp.

References buf, bufin, crc, crc32(), hfin, ired, lenin, oerr, posin, and ZR_NOTINITED.

Referenced by istore(), and sread().

Here is the call graph for this function:

◆ sflush()

unsigned TZip::sflush ( void *  param,
const char *  buf,
unsigned *  size 
)
static

Definition at line 2592 of file zip.cpp.

References buf, writ, and write().

Referenced by ideflate().

Here is the call graph for this function:

◆ sread()

unsigned TZip::sread ( TState s,
char *  buf,
unsigned  size 
)
static

Definition at line 2820 of file zip.cpp.

References buf, TState::param, and read().

Referenced by ideflate().

Here is the call graph for this function:

◆ swrite()

unsigned TZip::swrite ( void *  param,
const char *  buf,
unsigned  size 
)
static

Definition at line 2601 of file zip.cpp.

References buf, and write().

Referenced by Add(), and AddCentral().

Here is the call graph for this function:

◆ write()

unsigned int TZip::write ( const char *  buf,
unsigned int  size 
)

Definition at line 2608 of file zip.cpp.

References buf, encbuf, encbufsize, encwriting, hfout, keys, mapsize, obuf, oerr, opos, writ, zencode(), ZR_MEMSIZE, and ZR_NOTINITED.

Referenced by istore(), sflush(), and swrite().

Here is the call graph for this function:

Member Data Documentation

◆ attr

ulg TZip::attr

Definition at line 2498 of file zip.cpp.

Referenced by Add(), open_dir(), open_handle(), and open_mem().

◆ buf

char TZip::buf[16384]

Definition at line 2511 of file zip.cpp.

Referenced by ideflate(), istore(), read(), sflush(), sread(), swrite(), and write().

◆ bufin

const char* TZip::bufin

Definition at line 2506 of file zip.cpp.

Referenced by open_dir(), open_file(), open_handle(), open_mem(), and read().

◆ crc

ulg TZip::crc

Definition at line 2503 of file zip.cpp.

Referenced by Add(), open_dir(), open_file(), open_handle(), open_mem(), and read().

◆ csize

ulg TZip::csize

Definition at line 2509 of file zip.cpp.

Referenced by Add(), ideflate(), istore(), open_dir(), open_file(), open_handle(), and open_mem().

◆ encbuf

char* TZip::encbuf

Definition at line 2481 of file zip.cpp.

Referenced by Add(), write(), and ~TZip().

◆ encbufsize

unsigned int TZip::encbufsize

Definition at line 2482 of file zip.cpp.

Referenced by write().

◆ encwriting

bool TZip::encwriting

Definition at line 2479 of file zip.cpp.

Referenced by Add(), and write().

◆ hasputcen

bool TZip::hasputcen

Definition at line 2478 of file zip.cpp.

Referenced by Add(), Close(), Create(), and GetMemory().

◆ hfin

HANDLE TZip::hfin

Definition at line 2504 of file zip.cpp.

Referenced by iclose(), open_dir(), open_file(), open_handle(), open_mem(), and read().

◆ hfout

HANDLE TZip::hfout

Definition at line 2468 of file zip.cpp.

Referenced by Close(), Create(), open_handle(), oseek(), and write().

◆ hmapout

HANDLE TZip::hmapout

Definition at line 2470 of file zip.cpp.

Referenced by Close(), and Create().

◆ ired

long TZip::ired

Definition at line 2502 of file zip.cpp.

Referenced by iclose(), open_dir(), open_file(), open_handle(), open_mem(), and read().

◆ iseekable

bool TZip::iseekable

Definition at line 2501 of file zip.cpp.

Referenced by ideflate(), open_dir(), open_handle(), and open_mem().

◆ isize

long TZip::isize

Definition at line 2502 of file zip.cpp.

Referenced by Add(), iclose(), open_dir(), open_file(), open_handle(), and open_mem().

◆ keys

unsigned long TZip::keys[3]

Definition at line 2480 of file zip.cpp.

Referenced by Add(), and write().

◆ lenin

unsigned int TZip::lenin

Definition at line 2507 of file zip.cpp.

Referenced by open_mem(), and read().

◆ mapsize

unsigned int TZip::mapsize

Definition at line 2477 of file zip.cpp.

Referenced by Create(), oseek(), and write().

◆ mustclosehfout

bool TZip::mustclosehfout

Definition at line 2469 of file zip.cpp.

Referenced by Close(), and Create().

◆ obuf

char* TZip::obuf

Definition at line 2475 of file zip.cpp.

Referenced by Close(), Create(), GetMemory(), oseek(), and write().

◆ ocanseek

bool TZip::ocanseek

Definition at line 2474 of file zip.cpp.

Referenced by Add(), Create(), and oseek().

◆ oerr

ZRESULT TZip::oerr

Definition at line 2472 of file zip.cpp.

Referenced by Add(), Create(), oseek(), read(), and write().

◆ ooffset

unsigned TZip::ooffset

Definition at line 2471 of file zip.cpp.

Referenced by Add(), AddCentral(), Create(), and oseek().

◆ opos

unsigned int TZip::opos

Definition at line 2476 of file zip.cpp.

Referenced by Create(), oseek(), and write().

◆ password

char* TZip::password

Definition at line 2467 of file zip.cpp.

Referenced by Add(), TZip(), and ~TZip().

◆ posin

unsigned int TZip::posin

Definition at line 2507 of file zip.cpp.

Referenced by open_mem(), and read().

◆ selfclosehf

bool TZip::selfclosehf

Definition at line 2505 of file zip.cpp.

Referenced by iclose(), open_dir(), open_file(), open_handle(), and open_mem().

◆ state

TState* TZip::state

Definition at line 2485 of file zip.cpp.

Referenced by ideflate(), and ~TZip().

◆ times

iztimes TZip::times

Definition at line 2499 of file zip.cpp.

Referenced by Add(), open_dir(), open_handle(), and open_mem().

◆ timestamp

ulg TZip::timestamp

Definition at line 2500 of file zip.cpp.

Referenced by Add(), open_dir(), open_handle(), and open_mem().

◆ writ

unsigned TZip::writ

Definition at line 2473 of file zip.cpp.

Referenced by Add(), AddCentral(), Create(), GetMemory(), sflush(), and write().

◆ zfis

TZipFileInfo* TZip::zfis

Definition at line 2484 of file zip.cpp.

Referenced by Add(), and AddCentral().


The documentation for this class was generated from the following file: