///////////////////////////////////////////////////////////////////////////// // Creation 18/12/2003 // // // LZCOPY.C // -------- // // // Sylvain MARECHAL - sylvain.marechal1@libertysurf.fr ///////////////////////////////////////////////////////////////////////////// // // Show lz functions usage. // To compress a file, use the microsoft utility compress.exe // There isnt no Win32 API to compress file // // Usage: lzcopy // ///////////////////////////////////////////////////////////////////////////// #include #include int main( int argc, char * argv[] ) { OFSTRUCT ofs; int zhfSource, zhfDest; char source[MAX_PATH], dest[MAX_PATH]; if( argc != 3 ) { printf( "Usage: %s \n", argv[0] ); return 1; } strcpy( source, argv[1] ); strcpy( dest, argv[2] ); ofs.cBytes =sizeof(ofs); zhfSource =LZOpenFile(source,&ofs,OF_READ); zhfDest =LZOpenFile(dest,&ofs, OF_CREATE |OF_WRITE); LZCopy(zhfSource,zhfDest); LZClose(zhfSource); LZClose(zhfDest); return 0; }