Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
bzip2dll.c
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
3 #2023 X March 21 19:50 PM Brasília Time
4
5* *
6* Licensa de Copia (C) <2023> <Aurora Boreal> *
7* *
8* Este programa e software livre: voce pode redistribuir isto e/ou *
9* modificar isto sobre os termos do GNU Licensa Geral Pública como 25
10* publicado pela Fundacao de Software Livre, tanto a versão 3 da *
11* Licensa, ou (dependendo da sua opcao) qualquer versao posterior. *
12* *
13* Este programa e distribuido na esperanca que isto vai ser util, *
14* mas SEM QUALQUER GARANTIA; sem ate mesmo a implicada garantia de *
15* COMERCIALIZAcaO ou CABIMENTO PARA UM FIM PARTICULAR. Veja a *
16* Licensa Geral Publica para mais detalhes. *
17* *
18* Você deve ter recebido uma cópia da LICENSA GERAL PUBLICA e a GNU *
19* Licensa Publica Menor junto com este programa *
20* Se não, veja <http://www.gnu.org/licenses/>. *
21* *
22* Suporte: sourceforge.net github.com *
23* *
24* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
25
26* Pereira: arsoftware25@gmail.com ricardo@arsoftware.net.br *
27* xcx: arsoftware10@gmail.com charli@arsoftware.net.br *
28
29 pereira1001@users.sourceforge.net
30 */
31
32/*
33 <main dll interface>
34 Copyright (C) BW
35 */
36#include <windows.h>
37#include <stdint.h>
38#include <stdio.h>
39#include <stdlib.h>
40#include <string.h>
41#include <time.h>
42#include <errno.h>
43#include <fcntl.h>
44#include <ctype.h>
45#include <math.h>
46#include <wctype.h>
47#include <wchar.h>
48#include <stdarg.h>
49#include <stddef.h>
50#include <setjmp.h>
51#include <locale.h>
52#include <signal.h>
53#include <limits.h>
54#include <float.h>
55#include <iso646.h>
56
57#undef NDEBUG
58#include <assert.h>
59
60#include "bzlib.h"
61
62// #include "aline_definitive_header_2_.h"
63
64void
66(
67 int amanda_level,
68 char *format, ...
69);
70
74#define AMANDA__SIZE ((32767 * 6) + 2)
79#define AMANDA__SIZE_w (32767)
80
81
82#ifdef _WIN64
83#define __INT32_OR_INT64 __int64
84#else
85#define __INT32_OR_INT64 int
86#endif
87
88int utf8towide(const char *pUTF8, WCHAR *pUSC2, int nUSC2);
89
91void removedordeespaconofinal(char *path);
92char *getcpuname_k(void);
94char myinfile[255];
95char myoutfile[255];
97char mylevel[255];
98char library[255];
101
103int64_t intfatia;
106
107int modo = 0;
108int levelok = 6;
109
110extern int bzip3percent;
111
113
114void dprintf(char *format, ...);
115
120__int64
122{
123 __int64 ret_z;
124 FILE *myfile; // = NULL;
125 {
126 if ((myfile = fopen(infile_ar, "rb")) == NULL)
127 {
128 return 0;
129 }
130 }
131 ret_z = _fseeki64(myfile, 0, SEEK_END);
132 ret_z = _ftelli64(myfile);
133 fclose(myfile);
134 return ret_z;
135}
136
142int __stdcall bzip2compress(char *infile, char *outfile, char *levelch)
143{
144 char *fn_r = NULL;
145 char *fn_w = NULL;
146
147 int len;
148 char buff[0x10001];
149
150 int returnvalue = 0;
151 BZFILE *BZ2fp_w = NULL;
152 FILE *fp_r = NULL;
153 int ret;
154 int berr = 0;
155
156 fn_r = infile;
157 fn_w = outfile;
158
159 intpause = 0;
160 intcancel = 0;
162
164
165 ret = SetFileAttributes(outfile, FILE_ATTRIBUTE_ARCHIVE);
166
168
169 {
170 if (fn_r)
171 {
172 if ((fp_r = fopen(fn_r, "rb")) == NULL)
173 {
175 return (8);
176 }
177 }
178 }
179 intfatia = 0;
180
181 pedro_dprintf(-1, "Level %s\n", levelch);
182
183 if ((fn_w != NULL && (BZ2fp_w = BZ2_bzopen(fn_w, levelch)) == NULL))
184 {
185 fclose(fp_r);
187 return (9);
188 }
189
190 berr = 0;
191 BZ2_bzerror(BZ2fp_w, &berr);
192
193 if (0 != berr)
194 {
195
196 returnvalue = 11;
197 goto saida;
198 }
199
200 while ((len = fread(buff, 1, 0x10000, fp_r)) > 0)
201 {
202
203 while (intpause)
204 {
205
206 if (intcancel)
207 {
209
210 break;
211 }
212
213 Sleep(50);
214 }
215
216 if (intcancel)
217 {
219
220 break;
221 }
222
224
225 ret = BZ2_bzwrite(BZ2fp_w, buff, len);
226
227 if (-1 == ret)
228 {
229 returnvalue = 10;
230 break;
231 }
232
233 berr = 0;
234 BZ2_bzerror(BZ2fp_w, &berr);
235
236 if (0 != berr)
237 {
238
239 returnvalue = 11;
240 goto saida;
241 }
242 }
243
244saida:
245
246 if (BZ2fp_w)
247 {
248 BZ2_bzclose(BZ2fp_w);
249 }
250
251 if (fp_r)
252 {
253 fclose(fp_r);
254 }
255
256 if ((0 == returnvalue) && intcancel)
257 {
258
259 returnvalue = 119;
260
261 unlink(outfile);
262 }
263
265
266 return returnvalue;
267}
268
269int __stdcall bzip2decompress(char *infile, char *outfile)
270{
271
272 int executed = 0;
273
274 char *fn_r = NULL;
275 char *fn_w = NULL;
276
277 int len;
278 char buff[0x10001];
279 int berr = 0;
280
281 BZFILE *BZ2fp_r = NULL;
282 FILE *fp_w = NULL;
283 int returnvalue = 0;
284
285 FILE *myfile = NULL;
287 intpause = 0;
288 intcancel = 0;
289
291
292 fn_w = outfile;
293 fn_r = infile;
294 {
295 SetFileAttributes(outfile, FILE_ATTRIBUTE_ARCHIVE);
296 }
297 {
298 if ((myfile = fopen(infile, "rb")) == NULL)
299 {
301 return 8;
302 }
303 }
304
305 {
306 char temp[300];
307 fread(temp, 1, 4, myfile);
308 if (0 != memcmp(temp, "BZh", 3))
309 {
310 fclose(myfile);
311 myfile = NULL;
312 returnvalue = 14;
313 goto saida;
314 }
315 }
316
318 intfatia = 0;
319 if (fn_w)
320 {
321 {
322 if ((fp_w = fopen(fn_w, "wb")) == NULL)
323 {
325 return (9);
326 }
327 }
328 }
329
330 if ((fn_r != NULL && (BZ2fp_r = BZ2_bzopen(fn_r, "rb")) == NULL))
331 {
332 fclose(fp_w);
334 return (8);
335 }
336 berr = 0;
337 BZ2_bzerror(BZ2fp_r, &berr);
338 if (0 != berr)
339 {
340 returnvalue = 12;
341 goto saida;
342 }
343 while ((len = BZ2_bzread(BZ2fp_r, buff, 0x10000)) > 0)
344 {
345 executed = 1;
346 berr = 0;
347 BZ2_bzerror(BZ2fp_r, &berr);
348 if (0 != berr)
349 {
350 returnvalue = 12;
351 goto saida;
352 }
354 while (intpause)
355 {
356
357 if (intcancel)
358 {
360 break;
361 }
362
363 Sleep(50);
364 }
365
366 if (intcancel)
367 {
369 break;
370 }
371
372 fwrite(buff, 1, len, fp_w);
373 }
374
375 if (-1 == len)
376 {
377 returnvalue = 15;
378 }
379
380saida:;
381 if (myfile)
382 {
383 fclose(myfile);
384 }
385
386 if (BZ2fp_r)
387 {
388 BZ2_bzclose(BZ2fp_r);
389 }
390
391 if (fp_w)
392 {
393 fclose(fp_w);
394 }
395
396 if ((0 == returnvalue) && (filesize_bzip2_xcx > 100) && (0 == executed))
397 {
398 returnvalue = 13;
399 }
400
401 if ((0 == returnvalue) && intcancel)
402 {
403 returnvalue = 119;
404 }
405
407 return returnvalue;
408}
409
410int __stdcall pause(void)
411{
412 intpause = 1;
413 return 0;
414}
415
416int __stdcall cancel(void)
417{
418 intcancel = 1;
419 return 0;
420}
421int __stdcall bresume(void)
422{
423 intpause = 0;
424 return 0;
425}
426
427int __stdcall startapi_bzip2_xcx(__attribute__((unused)) int parameter)
428{
429 if (comando_bzip2_xcx == 0)
430 {
431 intreturn = 0;
433 }
434 if (1 == comando_bzip2_xcx)
435 {
436 intreturn = 0;
438 }
439 if (2 == comando_bzip2_xcx)
440 {
441 intreturn = 0;
442 intreturn = 0; //bzip3compress (myinfile, myoutfile, levelok);
443 }
444 if (3 == comando_bzip2_xcx)
445 {
446 intreturn = 0;
447 intreturn = 0; //bzip3uncompress (myinfile, myoutfile);
448 }
449 if (4 == comando_bzip2_xcx)
450 {
451 intreturn = 0;
452 intreturn = 0; //bzip3compress_sha512_k (myinfile, myoutfile, levelok);
453 }
454 return 0;
455}
456
457int __stdcall execute(char *infile, char *outfile, char *level, int comando_bzip2_xcx1)
458{
459 HANDLE myhandle;
460 __INT32_OR_INT64 ThreadId;
461 __INT32_OR_INT64 parameter = 1;
462 strcpy(myinfile, infile);
463 strcpy(myoutfile, outfile);
464 strcpy(mylevel, level);
465 comando_bzip2_xcx = comando_bzip2_xcx1;
466 myhandle = CreateThread((LPSECURITY_ATTRIBUTES)0, (DWORD)0, (void *)startapi_bzip2_xcx, (LPVOID)parameter, (DWORD)0, (LPDWORD)&ThreadId);
467 CloseHandle(myhandle);
468 return 2;
469}
470static int getpor_bzip2_xcx(int64_t max, int64_t fatia)
471{
472 double a;
473 a = (double)max;
474 if (max == 0)
475 {
476 return 0;
477 }
478 a = ((double)100 / max) * fatia;
479 return (int)a;
480}
481int __stdcall getprogress()
482{
483 int ret = 0;
484 if (1 == modo)
485 {
486 //ret = bzip3percent;
487 }
488 else
489 {
490 ret = getpor_bzip2_xcx(filesize_bzip2_xcx, intfatia);
491 }
492
493 if (ret > 100)
494 {
495 ret = 100;
496 }
497 if (ret < 0)
498 {
499 ret = 0;
500 }
501 if (intstatus_bzip2_xcx == 1)
502 {
503
504 if (ret > 98)
505 {
506 ret = 99;
507 }
508 }
509
510 return ret;
511}
512
513int __stdcall status(int newvalue)
514{
515 if (newvalue == 1)
516 {
518 return 1;
519 }
520 return intstatus_bzip2_xcx;
521}
522
523int __stdcall interface1_bzip2_xcx(__INT32_OR_INT64 argumento1, __INT32_OR_INT64 argumento2, __INT32_OR_INT64 argumento3, __INT32_OR_INT64 argumento4)
524{
525 static char inputfile[AMANDA__SIZE];
526 static char outputfile[AMANDA__SIZE];
527 if (!strcmp((char *)argumento1, "compress"))
528 {
529 modo = 0;
530 strcpy(inputfile, (char *)argumento2);
531 strcpy(outputfile, (char *)argumento3);
532 execute(inputfile, outputfile, (char *)argumento4, 0); //0 compress 1 decompress
533 return 1;
534 }
535 if (!strcmp((char *)argumento1, "compressbzip3"))
536 {
537 modo = 1;
538 strcpy(inputfile, (char *)argumento2);
539 strcpy(outputfile, (char *)argumento3);
540 execute(inputfile, outputfile, (char *)argumento4, 2); //0 compress 1 decompress
541 return 1;
542 }
543
544 if (!strcmp((char *)argumento1, "compressbzip3_sha512_k"))
545 {
546 modo = 1;
547 strcpy(inputfile, (char *)argumento2);
548 strcpy(outputfile, (char *)argumento3);
549 execute(inputfile, outputfile, (char *)argumento4, 4); //0 compress 1 decompress
550 return 1;
551 }
552
553 if (!strcmp((char *)argumento1, "decompress"))
554 {
555 modo = 0;
556 strcpy(inputfile, (char *)argumento2);
557 strcpy(outputfile, (char *)argumento3);
558 execute(inputfile, outputfile, (char *)argumento4, 1); //0 compress 1 decompress
559 return 1;
560 }
561 if (!strcmp((char *)argumento1, "decompressbzip3"))
562 {
563 modo = 1;
564 strcpy(inputfile, (char *)argumento2);
565 strcpy(outputfile, (char *)argumento3);
566 execute(inputfile, outputfile, (char *)argumento4, 3); //0 compress 1 decompress
567 return 1;
568 }
569
570 if (!strcmp((char *)argumento1, "status"))
571 {
572 return (status(argumento2));
573 }
574
575 if (!strcmp((char *)argumento1, "getprogress"))
576 {
577 return (getprogress());
578 }
579 if (!strcmp((char *)argumento1, "bresume"))
580 {
581 return (bresume());
582 }
583 if (!strcmp((char *)argumento1, "pause"))
584 {
585 return (pause());
586 }
587 if (!strcmp((char *)argumento1, "cancel"))
588 {
589 while (intstatus_bzip2_xcx)
590 {
591#ifdef NPRINTF
592 dprintf(" loopenado no cancel\n");
593#endif
594 cancel();
595 Sleep(50);
596 };
597 return (cancel());
598 }
599 if (!strcmp((char *)argumento1, "selectlibrary"))
600 {
601 strcpy(library, (char *)argumento2);
602 return (3);
603 }
604
605 if (!strcmp((char *)argumento1, "thestatus"))
606 {
607 return intstatus_bzip2_xcx;
608 }
609
610 if (!strcmp((char *)argumento1, "intreturn"))
611 {
612 return (intreturn);
613 }
614
615 if (!strcmp((char *)argumento1, "setlevel"))
616 {
617 levelok = argumento2;
618#ifdef NPRINTF
619 dprintf("compression level %d \n", levelok);
620#endif
621 return 0;
622 }
623
624 if (!strcmp((char *)argumento1, "getcpuname"))
625 {
626 strcpy((char *)argumento2, getcpuname_k());
627 return (0);
628 }
629 if (!strcmp((char *)argumento1, "getbrandstring"))
630 {
631 strcpy((char *)argumento2, getprocessorbrandstring_k());
632 return (0);
633 }
634 return 15;
635}
636
637double _time;
638int __stdcall ControlName_bzip2_xcx(char *data)
639{
640 strcpy(data, "BW Bzip2 DLL " AMARIC__VERSION
641#ifdef _WIN64
642 " 64 bits"
643#else
644 " 32 bits"
645#endif
646 );
647 return 0;
648}
649int __stdcall GetCPUVendor(char *data)
650{
652 return 0;
653}
654
655int __stdcall GetCPUBrandString(char *data)
656{
658 return 0;
659}
660
661void mprintf2_bzip2_xcx(char *format, ...)
662{
663 int val;
664 va_list args;
665 static char buffer[50000];
666 va_start(args, format);
667 vsprintf(buffer, format, args);
668 val = MessageBox(0, buffer, "BW", MB_OK | MB_TOPMOST);
669 if (val != IDOK)
670 {
671 ;
672 }
673}
674
675int __stdcall About_bzip2_xcx()
676{
677 mprintf2_bzip2_xcx("Win32 and Win64 DLL to compress files using bzip2 or bzip3 compression methods");
678 return 0;
679}
680
681int __stdcall Compress_bzip2_xcx(char *Inputfile, char *OutPutFile, int CompressionLevel)
682{
683 char level[300];
684 int ret;
686 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 0, 0, 0);
687 if (1 == ret)
688 {
689 return 7;
690 }
691
692 _time = (double)GetTickCount();
693
694 if ((CompressionLevel > 9) || (CompressionLevel < 0))
695 {
696 return 1;
697 }
698 intreturn = 0;
699 sprintf(level, "w%d", CompressionLevel);
700
701 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 1, 0, 0);
702
703 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "compress", (__INT32_OR_INT64)Inputfile, (__INT32_OR_INT64)OutPutFile, (__INT32_OR_INT64)level);
704
705 return 0;
706}
707
708int __stdcall GetStatus() //retorna 1 se estiver executando
709{
710 return interface1_bzip2_xcx((__INT32_OR_INT64) "status", 0, 0, 0);
711}
712
714{
715 return interface1_bzip2_xcx((__INT32_OR_INT64) "intreturn", 0, 0, 0);
716}
721double
722dgetval(double maxa, double porr)
723{
724 maxa = (maxa / 100) * porr;
725 return maxa;
726}
727
731double
732dgetmax(double por, double fatia)
733{
734 double a;
735 double b;
736 a = (double)por;
737 b = (double)fatia;
738 if (por == 0.0)
739 {
740 return 0.0;
741 }
742 a = (b / a) * (float)100.0;
743 return (double)a;
744}
745
746double dgetpor_bzip2_xcx(double maxa, double fatiaa)
747{
748
749 if (maxa == 0)
750 {
751 return 0;
752 }
753
754 maxa = ((double)100.0 / maxa * fatiaa);
755
756 return (double)maxa;
757}
758
759int secondtostring(double value, char *data)
760{
761 //[closed]
762 unsigned int frame;
763 unsigned int ret;
764 unsigned int seg;
765 unsigned int min;
766 unsigned int hour;
767 ret = (unsigned int)value;
768 frame = ret % 1000;
769 ret = ret / 1000;
770 seg = ret % 60;
771 ret = ret / 60; // minutos
772 min = ret % 60;
773 ret = ret / 60; // horas
774 hour = ret % 100;
775 sprintf(data, "%02d:%02d:%02d:%03d", hour, min, seg, frame);
776 return 0;
777}
778
779int __stdcall GetProgress();
780int __stdcall GetTimeToFinish(char *data)
781{
782 void dprintf3(char *format, ...);
783 double dret;
784 double dporcentagem;
785
786 double desloca = (double)GetTickCount();
787
788 dporcentagem = (double)GetProgress();
789
790 dret = dgetmax(dporcentagem, desloca - _time);
791#ifdef NPRINTF
792 dprintf("valor %f\n", dret);
793#endif
794 dret = dret - (desloca - _time);
795
796 secondtostring(dret, data);
797#ifdef NPRINTF
798 dprintf("valor2 %s\n", data);
799#endif
800 return 0;
801}
802
804{
805 return interface1_bzip2_xcx((__INT32_OR_INT64) "getprogress", 0, 0, 0);
806}
807
808int __stdcall CompressBzip3(char *Inputfile, char *OutPutFile, int CompressionLevel)
809{
810 char level[300];
811 int ret;
813 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 0, 0, 0);
814
815 if (1 == ret)
816 {
817
818 return 7;
819 }
820
821 _time = (double)GetTickCount();
822
823 if ((CompressionLevel > 9) || (CompressionLevel < 0))
824 {
825 return 1;
826 }
827
828 sprintf(level, "w%d", CompressionLevel);
829
830 interface1_bzip2_xcx((__INT32_OR_INT64) "setlevel", CompressionLevel, CompressionLevel, CompressionLevel);
831
832 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 1, 0, 0);
833
834 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "compressbzip3", (__INT32_OR_INT64)Inputfile, (__INT32_OR_INT64)OutPutFile, (__INT32_OR_INT64)level);
835
836 return 0;
837}
838
839int __stdcall CompressBzip3_SHA512_k(char *Inputfile, char *OutPutFile, int CompressionLevel)
840{
841 char level[300];
842 int ret;
844 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 0, 0, 0);
845
846 if (1 == ret)
847 {
848
849 return 7;
850 }
851
852 _time = (double)GetTickCount();
853
854 if ((CompressionLevel > 9) || (CompressionLevel < 0))
855 {
856 return 1;
857 }
858
859 sprintf(level, "w%d", CompressionLevel);
860
861 interface1_bzip2_xcx((__INT32_OR_INT64) "setlevel", CompressionLevel, CompressionLevel, CompressionLevel);
862
863 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 1, 0, 0);
864
865 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "compressbzip3_sha512_k", (__INT32_OR_INT64)Inputfile, (__INT32_OR_INT64)OutPutFile, (__INT32_OR_INT64)level);
866
867 return 0;
868}
869
870int __stdcall PauseCompress()
871{
872 return interface1_bzip2_xcx((__INT32_OR_INT64) "pause", 0, 0, 0);
873}
874
875int __stdcall ResumeCompress()
876{
877 return interface1_bzip2_xcx((__INT32_OR_INT64) "bresume", 0, 0, 0);
878}
879
880int __stdcall CancelCompress()
881{
882 return interface1_bzip2_xcx((__INT32_OR_INT64) "cancel", 0, 0, 0);
883}
884
885int __stdcall Decompress(char *Inputfile, char *OutPutFile)
886{
887 int ret;
889 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 0, 0, 0);
890
891 if (1 == ret)
892 {
893
894 return 7;
895 }
896 _time = (double)GetTickCount();
897 intreturn = 0;
898 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 1, 0, 0);
899 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "decompress", (__INT32_OR_INT64)Inputfile, (__INT32_OR_INT64)OutPutFile, (__INT32_OR_INT64) "w9");
900 return 0;
901}
902
903int __stdcall DecompressBzip3(char *Inputfile, char *OutPutFile)
904{
905 int ret;
907 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 0, 0, 0);
908
909 if (1 == ret)
910 {
911 return 7;
912 }
913 _time = (double)GetTickCount();
914 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "status", 1, 0, 0);
915 ret = interface1_bzip2_xcx((__INT32_OR_INT64) "decompressbzip3", (__INT32_OR_INT64)Inputfile, (__INT32_OR_INT64)OutPutFile, (__INT32_OR_INT64) "w9");
916 return 0;
917}
918/*
919int __stdcall stringtobyte(unsigned char *dest, unsigned char *src, int len)
920{
921 int i;
922 for (i = 0; i < len; i++)
923 {
924 dest[i] = src[i];
925 }
926 return 0;
927}
928int __stdcall bytetostring(unsigned char *dest, unsigned char *src, int len)
929{
930 int i;
931 for (i = 0; i < len; i++)
932 {
933 dest[i] = src[i];
934 }
935 dest[i] = 0;
936 return 0;
937}
938*/
void * LPVOID
Definition 7zTypes.h:200
#define FILE_ATTRIBUTE_ARCHIVE
Definition 7zTypes.h:147
UINT32 DWORD
Definition 7zTypes.h:194
#define AMARIC__VERSION
Definition aline_definitive_header_2_.h:1
int __stdcall execute()
#define __attribute__(unused_ric_since_2004)
Definition main_cr.c:84
#define min(a, b)
Definition compress42.c:304
Definition poolTests.c:28
void mprintf2_bzip2_xcx(char *format,...)
Definition bzip2dll.c:661
int unicodemode_bzip2_xcx
Definition bzip2dll.c:112
int __stdcall CancelCompress()
Definition bzip2dll.c:880
int secondtostring(double value, char *data)
Definition bzip2dll.c:759
#define AMANDA__SIZE
Definition bzip2dll.c:74
void dprintf(char *format,...)
Definition dprintf.c:96
void removedordeespaconoinicio(char *path)
int __stdcall ControlName_bzip2_xcx(char *data)
Definition bzip2dll.c:638
int __stdcall bzip2compress(char *infile, char *outfile, char *levelch)
Definition bzip2dll.c:142
int __stdcall startapi_bzip2_xcx(__attribute__((unused)) int parameter)
Definition bzip2dll.c:427
int __stdcall DecompressBzip3(char *Inputfile, char *OutPutFile)
Definition bzip2dll.c:903
int __stdcall GetTimeToFinish(char *data)
Definition bzip2dll.c:780
int __stdcall PauseCompress()
Definition bzip2dll.c:870
int __stdcall ResumeCompress()
Definition bzip2dll.c:875
int __stdcall getprogress()
Definition bzip2dll.c:481
double dgetval(double maxa, double porr)
Definition bzip2dll.c:722
char mylevel[255]
Definition bzip2dll.c:97
int __stdcall status(int newvalue)
Definition bzip2dll.c:513
int __stdcall GetStatus()
Definition bzip2dll.c:708
#define __INT32_OR_INT64
Definition bzip2dll.c:85
int __stdcall GetCPUVendor(char *data)
Definition bzip2dll.c:649
int levelok
Definition bzip2dll.c:108
char library[255]
Definition bzip2dll.c:98
double _time
Definition bzip2dll.c:637
int __stdcall CompressBzip3(char *Inputfile, char *OutPutFile, int CompressionLevel)
Definition bzip2dll.c:808
void removedordeespaconofinal(char *path)
double dgetmax(double por, double fatia)
Definition bzip2dll.c:732
char * getcpuname_k(void)
Definition cpu_fixed_z.c:233
int intcancel
Definition bzip2dll.c:100
char * getprocessorbrandstring_k(void)
Definition cpu_fixed_z.c:125
int __stdcall bresume(void)
Definition bzip2dll.c:421
int __stdcall interface1_bzip2_xcx(__INT32_OR_INT64 argumento1, __INT32_OR_INT64 argumento2, __INT32_OR_INT64 argumento3, __INT32_OR_INT64 argumento4)
Definition bzip2dll.c:523
int intstatus_bzip2_xcx
Definition bzip2dll.c:104
int __stdcall GetCPUBrandString(char *data)
Definition bzip2dll.c:655
char myoutfile[255]
Definition bzip2dll.c:95
int bzip3percent
Definition bzip3.c:204
int __stdcall About_bzip2_xcx()
Definition bzip2dll.c:675
int comando_bzip2_xcx
Definition bzip2dll.c:96
int __stdcall GetReturnValue_bzip2_xcx()
Definition bzip2dll.c:713
int intpause
Definition bzip2dll.c:99
int __stdcall cancel(void)
Definition bzip2dll.c:416
int __stdcall bzip2decompress(char *infile, char *outfile)
Definition bzip2dll.c:269
int intreturn
Definition bzip2dll.c:105
int modo
Definition bzip2dll.c:107
int __stdcall GetProgress_bzip2_xcx()
Definition bzip2dll.c:803
int __stdcall Compress_bzip2_xcx(char *Inputfile, char *OutPutFile, int CompressionLevel)
Definition bzip2dll.c:681
double dgetpor_bzip2_xcx(double maxa, double fatiaa)
Definition bzip2dll.c:746
int64_t filesize_bzip2_xcx
Definition bzip2dll.c:102
int utf8towide(const char *pUTF8, WCHAR *pUSC2, int nUSC2)
int __stdcall GetProgress()
Definition bzip2dll.c:921
char myinfile[255]
Definition bzip2dll.c:94
int64_t intfatia
Definition bzip2dll.c:103
int __stdcall CompressBzip3_SHA512_k(char *Inputfile, char *OutPutFile, int CompressionLevel)
Definition bzip2dll.c:839
int __stdcall pause(void)
Definition bzip2dll.c:410
__int64 getfilesize_bzip2_xcx_ar(char *infile_ar)
Definition bzip2dll.c:121
int __stdcall Decompress(char *Inputfile, char *OutPutFile)
Definition bzip2dll.c:885
void pedro_dprintf(int amanda_level, char *format,...)
Definition pedro.c:43
BZ_EXTERN BZFILE *BZ_API BZ2_bzopen(const char *path, const char *mode)
Definition bzlib.c:1802
BZ_EXTERN int BZ_API BZ2_bzwrite(BZFILE *b, void *buf, int len)
Definition bzlib.c:1833
BZ_EXTERN int BZ_API BZ2_bzread(BZFILE *b, void *buf, int len)
Definition bzlib.c:1816
void BZFILE
Definition bzlib.h:137
BZ_EXTERN void BZ_API BZ2_bzclose(BZFILE *b)
Definition bzlib.c:1856
BZ_EXTERN const char *BZ_API BZ2_bzerror(BZFILE *b, int *errnum)
Definition bzlib.c:1902
int
Definition lzoconf.h:340
void * myfile
Definition dll.c:155
#define SEEK_END
Definition zconf.h:500
#define b(i)
Definition sha256.c:42
#define a(i)
Definition sha256.c:41
#define NULL
Definition getopt1.c:37
static uint32_t const uint8_t uint32_t len
Definition memcmplen.h:44
ret
Definition zlib_interface.c:30