1#include "zipios++/zipios-config.h"
3#include "zipios++/meta-iostreams.h"
11using namespace zipios ;
16void exitUsage(
int exit_code ) ;
18int main(
int argc,
char *argv[] ) {
19 _progname = argv[ 0 ] ;
23 ofstream exef( argv[ 1 ], ios::app | ios::binary ) ;
25 cout <<
"Error: Unable to open " << argv[ 1 ] <<
" for writing" << endl ;
29 ifstream zipf( argv[ 2 ], ios::in | ios::binary ) ;
31 cout <<
"Error: Unable to open " << argv[ 2 ] <<
" for reading." << endl ;
36 uint32 zip_start = exef.tellp() ;
37 cout <<
"zip start will be at " << zip_start << endl ;
41 exef << zipf.rdbuf() ;
43 writeUint32( zip_start, exef ) ;
52 cout <<
"Usage: " << _progname <<
" exe-file zipfile" << endl ;
55void exitUsage(
int exit_code ) {
Header file containing classes and functions for reading the central directory and local header field...
Header file that defines I/O functions for the header structures defined in ziphead....