kapiaba Posted March 12, 2015 Report Share Posted March 12, 2015 Buenas, Alguém tem a 7-zip32.dll Queria testar o 7ZIP?.PRG do xharbour. obg. abs. Ronaldbuch 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 12, 2015 Author Report Share Posted March 12, 2015 http://www.dlldll.com/7-zip32.dll_download.html Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 12, 2015 Author Report Share Posted March 12, 2015 Show() de bola: /* $Id: 7zip.prg 9354 2011-03-13 06:15:00Z andijahja $ Test program with 7Zip Compression WARNING: Must link SEVENZIP.LIB */ #include "FiveWin.ch" #define MAX_BUFFER 4096 #include "simpleio.ch" PROCEDURE MAIN() LOCAL my7z IF FILE( "mytest.7z" ) FErase( "mytest.7z" ) ENDIF WITH OBJECT my7z := T7Zip():New() :cArcName := "mytest.7z" :aFiles := { "hello.prg", "test.dbf" } // :aFiles := "test.dbf" :cCompressionMethod := "ppmd" :nBuffer := MAX_BUFFER :Create() ? :cBuffer ? 'RETURN ERROR:', :nError, :ErrorDescription ? :List() ? :cBuffer ? 'RETURN ERROR:', :nError, :ErrorDescription ? :Test() ? :cBuffer ? 'RETURN ERROR:', :nError, :ErrorDescription // :nBuffer := MAX_BUFFER // :Extract( .T. ) // ? :cBuffer // ? 'RETURN ERROR:', :nError, :ErrorDescription END IF FILE( "mytest.7z" ) MsgInfo( "Arquivo: mytest.7z Criado com sucesso", "Sucesso" ) ENDIF RETURN Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 12, 2015 Author Report Share Posted March 12, 2015 /* $Id: 7zip2.prg 9362 2011-03-15 03:19:29Z andijahja $ Test program with 7Zip Compression WARNING: Must link SEVENZIP.LIB */ #include "FiveWin.ch" #include "simpleio.ch" #define ARCTYPE_7Z 1 #define ARCTYPE_ZIP 2 #define CMPMETHOD_LZMA 1 // LZ-based algorithm #define CMPMETHOD_LZMA2 2 // LZMA-based algorithm #define CMPMETHOD_PPMD 3 // Dmitry Shkarin's PPMdH with small changes #define CMPMETHOD_BZIP2 4 // BWT algorithm #define CMPMETHOD_DEFLATE 5 // LZ+Huffman #define CMPMETHOD_COPY 6 // No compression #define CMPMETHOD_DEFLATE64 7 // LZ+Huffman #define CMPMETHOD_OPTIONS 7 + 1 #define MAX_ZIP_COMPRESSION 9 PROCEDURE MAIN() LOCAL my7z, i, t LOCAL aTime := Array( CMPMETHOD_OPTIONS ) LOCAL aTest := {"testLZMA.7z","testLZMA2.7z","testPPMD.7z","testBZIP2.7z","testDEFLATE.7z","testCOPY.7z","testDEFLATE64.7z","testZIP.zip"} LOCAL aMethod := {CMPMETHOD_LZMA,CMPMETHOD_LZMA2,CMPMETHOD_PPMD,CMPMETHOD_BZIP2,CMPMETHOD_DEFLATE,CMPMETHOD_COPY,CMPMETHOD_DEFLATE64,0} LOCAL acMethod := {"CMPMETHOD_LZMA","CMPMETHOD_LZMA2","CMPMETHOD_PPMD","CMPMETHOD_BZIP2","CMPMETHOD_DEFLATE","CMPMETHOD_COPY","CMPMETHOD_DEFLATE64","ARCTYPE_ZIP"} FOR i := 1 TO CMPMETHOD_OPTIONS IF File( aTest[ i ] ) Ferase( aTest[ i ] ) ENDIF NEXT WITH OBJECT my7z := T7Zip():New() // supposed to be run in tests folder // pls change aFiles if required :aFiles := "..\source\*.*" :cPassword := "xharbour" :lRecursive := .T. /* .T. = include sub-dirs */ FOR i := 1 TO CMPMETHOD_OPTIONS t := seconds() :cArcName := aTest[ i ] :nCompressionMethod := aMethod[ i ] IF i == CMPMETHOD_OPTIONS :nArctype := ARCTYPE_ZIP :nZipCompressionLevel := MAX_ZIP_COMPRESSION ENDIF ? 'Working with ' + acMethod[i] + '... Please wait' :Create() ? '['+acMethod[i]+'] command:', :cCommand ? '['+acMethod[i]+'] RETURN ERROR:', :nError, :ErrorDescription ? 'Time: ' aTime[ i ] := seconds() - t ? NEXT END ? ? '----------' ? 'Benchmark:' ? '----------' FOR i := 1 TO CMPMETHOD_OPTIONS IF File( aTest[ i ] ) ? PADR(aTest[i],20), PADR(acMethod[i],20), TRANSFORM( HB_FSize( aTest[i]), "99,999,999" ), aTime[i], "secs" ENDIF NEXT IF FILE( "testCOPY.7z" ) MsgInfo( "Arquivos Criados com sucesso", "Sucesso" ) ENDIF RETURN Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 12, 2015 Author Report Share Posted March 12, 2015 /* $Id: 7zip1.prg 9354 2011-03-13 06:15:00Z andijahja $ Test program with 7Zip Compression WARNING: Must link SEVENZIP.LIB */ #include "FiveWin.ch" #include "simpleio.ch" #define ARCTYPE_7Z 1 #define ARCTYPE_ZIP 2 PROCEDURE MAIN() LOCAL my7z IF File( "mytest.7z" ) FErase( "mytest.7z" ) ENDIF IF File( "mytest.zip" ) FErase( "mytest.zip" ) ENDIF WITH OBJECT my7z := T7Zip():New() // supposed to be run in tests folder // pls change aFiles if required :aFiles := "..\source\*.*" :cPassword := "xharbour" :lRecursive := .T. /* .T. = include sub-dirs */ :cArcName := "mytest.7z" // bem menor :nArctype := ARCTYPE_7Z :Create() ? '[ARCTYPE_7Z] command:', :cCommand ? '[ARCTYPE_7Z] RETURN ERROR:', :nError, :ErrorDescription ? :cArcName := "mytest.zip" // muito maior :nArctype := ARCTYPE_ZIP // nZipCompressionLevel valid 0 - 9, the higher the more compact // default = 5 */ // :nZipCompressionLevel := 9 :Create() ? '[ARCTYPE_ZIP] RETURN ERROR:', :nError, :ErrorDescription ? '[ARCTYPE_ZIP] cCommand:', :cCommand ? END IF FILE( "mytest.7z" ) MsgInfo( "Arquivos Criados com sucesso", "Sucesso" ) ENDIF RETURN Quote Link to comment Share on other sites More sharing options...
aferra Posted March 12, 2015 Report Share Posted March 12, 2015 fica menor do que usamos atualmente? kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 12, 2015 Author Report Share Posted March 12, 2015 sim, em 7zip é bem menor que em .zip Quote Link to comment Share on other sites More sharing options...
aferra Posted March 13, 2015 Report Share Posted March 13, 2015 Poxa, refiz minha função de zipar e terminei ontem, vc podia ter feito isso antes né? kkkkkkkkkkkkkkk vlw irei trocar...ou melhor acrescentar.... kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 13, 2015 Author Report Share Posted March 13, 2015 kkkkkkkk, eu só vi estes exemplos na pasta \TESTS do xHarbour ontem, dei uma olhada e achei simples pra karamba e realmente é muito fácil compactar os arquivos usando 7ZIP, super veloz, ele compactou a pasta \SOURCE do Five, na maior tranquilidade. Quote Link to comment Share on other sites More sharing options...
aferra Posted March 13, 2015 Report Share Posted March 13, 2015 me dá erro para karamba...mas como tenho outras coisas esse fica para depois... kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 13, 2015 Author Report Share Posted March 13, 2015 Aqui normal, FWH13.06 BCC582 xHarbour 06/03/2015. roda de maravilhas. http://forums.fivetechsupport.com/viewtopic.php?f=16&t=30357 abs. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted September 23, 2015 Author Report Share Posted September 23, 2015 Valdir, teste em 7 zip e me diga se funfa ou não. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 8, 2015 Author Report Share Posted December 8, 2015 Galera, se o arquivo compactado for .RAR, existe algum comando do xHarbour para compactar / descompactar? obg. abs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.