Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
dll.c File Reference
#include <windows.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <ctype.h>
#include <math.h>
#include <wctype.h>
#include <wchar.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <locale.h>
#include <signal.h>
#include <limits.h>
#include <float.h>
#include <iso646.h>
#include <assert.h>
#include <stdbool.h>
#include "aline_definitive_header_2_.h"

Macros

#define uchar   unsigned char
 
#define uint   unsigned int
 
#define ushort   unsigned short
 
#define AMARIC__VERSION   "7.7.0 build 480"
 
#define MYCAST   int
 
#define __amandacall   __stdcall
 
#define AMANDA__SIZE_ww   ((32767 * 2) + 2)
 
#define AMANDA__SIZE   ((32767 * 6) + 2)
 
#define AMANDA__SIZE_w   (32767)
 

Typedefs

typedef void * myfile
 

Functions

void pedro_dprintf (int amanda_level, char *format,...)
 
uint32_t tuklib_cpucores_z__5 (void)
 Borrowed from XZ compression.
 
int __amandacall get_multithread_progress__5 (void)
 
__int64 lffilesize (const char *szFileName)
 simple function to get the size of a utf-8 encoded filename, no support to long filenames yet (above MAX_PATH)
 
uint __stdcall rspcompress (char *inputfile, char *outfile)
 
int zcompress_sha512_k__5 (char *input, char *output, int levelin)
 function to compress a not standard gzip2 file
 
uint __stdcall rspuncompress (uchar *outfile, uchar *outfile2)
 
int zuncompress__5 (char *input, char *output)
 function to extract a not standard gzip2 file
 
int zcompress (char *input, char *output, int level)
 
int gzclose (myfile file)
 
myfile gzopen (char *path_now_as_utf8, char *mode)
 
int gzread (myfile file, char *buf, uint len)
 
char * gzerror (myfile file, int *errnum)
 
int gzwrite (myfile file, const char *buf, uint len)
 
void dprintf (char *format,...)
 
uint __stdcall rspvalidatefile (uchar *outfile2)
 
uint __stdcall getporcentagemxcx2 ()
 
uint __stdcall tcompressxcx2 (char *inputfile, char *outfile)
 
int __stdcall startapi (__attribute__((unused)) int parameter)
 
int __stdcall interface1___5 (int argumento1, int argumento2, int argumento3, __attribute__((unused)) int argumento4)
 
int __stdcall compress_g2___rspk_ar (char *Input_amanda_file, char *OutPut_ricardo_File, int Compression_juliete_Level, int n_threads_z__, char *temp_path_z__)
 function to compress a not standard gzip2 file
 
int __stdcall uncompress_g2___rspk_ar (char *Inputfile_arp, char *OutPutFile_arp, int n_threads_z__, char *temp_path_z_S2__, int *cores_used_z__)
 function to extract a not standard gzip2 file
 
int __stdcall get_progress_g2___ar (void)
 
int __stdcall pause_g2___aakp_g2___ar (void)
 
int __stdcall resume_g2___aakp_g2___ar (void)
 
int __stdcall cancel_g2___aakp_g2___ar (void)
 

Variables

intcores_used_z__5 = NULL
 
char temp_path_z__5 [AMANDA__SIZE]
 
int n_threads_z__5 = 1
 
bool is_multi_thread_z__5
 
uint intstatus__5 = 0
 
int zlibpercent__5
 
uint pauseflag__5
 
uint cancelflag__5
 
uint finished__5
 

Macro Definition Documentation

◆ __amandacall

#define __amandacall   __stdcall

◆ AMANDA__SIZE

#define AMANDA__SIZE   ((32767 * 6) + 2)

The maximum size of an utf-8 encoded filename with the max limit of a file in Windows

◆ AMANDA__SIZE_w

#define AMANDA__SIZE_w   (32767)

The maximum size of Unicode characters in a path in Windows, Linux is 1024 characters as far I know

◆ AMANDA__SIZE_ww

#define AMANDA__SIZE_ww   ((32767 * 2) + 2)

The maximum size of an utf-8 encoded filename with the max limit of a file in Windows

◆ AMARIC__VERSION

#define AMARIC__VERSION   "7.7.0 build 480"

◆ MYCAST

#define MYCAST   int

◆ uchar

#define uchar   unsigned char

◆ uint

#define uint   unsigned int

◆ ushort

#define ushort   unsigned short

Typedef Documentation

◆ myfile

typedef void* myfile

Function Documentation

◆ cancel_g2___aakp_g2___ar()

int __stdcall cancel_g2___aakp_g2___ar ( void )

◆ compress_g2___rspk_ar()

int __stdcall compress_g2___rspk_ar ( char * Input_amanda_file,
char * OutPut_ricardo_File,
int Compression_juliete_Level,
int n_threads_z__,
char * temp_path_z__ )

function to compress a not standard gzip2 file

Parameters
Input_amanda_fileutf-8 encoded input file
OutPut_ricardo_Fileutf-8 encoded output file
Compression_juliete_Levelthe level to use, range from 0 to 9, 9 best compression
Returns
int
0 - No error
7 - Cannot open input file
8 - Cannot open output file
14 - Cannot write to output file
16 - Internal error
19 - User cancel
140 - Unexpected error
401 - Cannot create temp file
402 - Cannot read from input file
403 - File access error
404 - Cannot open temp file

◆ dprintf()

void dprintf ( char * format,
... )

◆ get_multithread_progress__5()

int __amandacall get_multithread_progress__5 ( void )

◆ get_progress_g2___ar()

int __stdcall get_progress_g2___ar ( void )

◆ getporcentagemxcx2()

uint __stdcall getporcentagemxcx2 ( )

◆ gzclose()

int gzclose ( myfile file)

◆ gzerror()

char * gzerror ( myfile file,
int * errnum )

◆ gzopen()

myfile gzopen ( char * path_now_as_utf8,
char * mode )

◆ gzread()

int gzread ( myfile file,
char * buf,
uint len )

◆ gzwrite()

int gzwrite ( myfile file,
const char * buf,
uint len )

◆ interface1___5()

int __stdcall interface1___5 ( int argumento1,
int argumento2,
int argumento3,
__attribute__((unused)) int argumento4 )

◆ lffilesize()

__int64 lffilesize ( const char * szFileName)

simple function to get the size of a utf-8 encoded filename, no support to long filenames yet (above MAX_PATH)

to get the file input size, with support to files above 2gb, and unicode support

Parameters
szFileNameutf-8 encoded filename
Returns
__int64
Parameters
szFileNamethe utf-8 encoded input file
Returns
__int64
Parameters
szFileNameutf-8 encoded filename
Returns
__int64

simple function to get the size of a utf-8 encoded filename, no support to long filenames yet (above MAX_PATH)

Parameters
szFileNamethe utf-8 encoded input file
Returns
__int64

◆ pause_g2___aakp_g2___ar()

int __stdcall pause_g2___aakp_g2___ar ( void )

◆ pedro_dprintf()

void pedro_dprintf ( int amanda_level,
char * format,
... )

◆ resume_g2___aakp_g2___ar()

int __stdcall resume_g2___aakp_g2___ar ( void )

◆ rspcompress()

uint __stdcall rspcompress ( char * inputfile,
char * outfile )

◆ rspuncompress()

uint __stdcall rspuncompress ( uchar * outfile,
uchar * outfile2 )

◆ rspvalidatefile()

uint __stdcall rspvalidatefile ( uchar * outfile2)

◆ startapi()

int __stdcall startapi ( __attribute__((unused)) int parameter)

◆ tcompressxcx2()

uint __stdcall tcompressxcx2 ( char * inputfile,
char * outfile )

◆ tuklib_cpucores_z__5()

uint32_t tuklib_cpucores_z__5 ( void )

Borrowed from XZ compression.

◆ uncompress_g2___rspk_ar()

int __stdcall uncompress_g2___rspk_ar ( char * Inputfile_arp,
char * OutPutFile_arp,
int n_threads_z__,
char * temp_path_z_S2__,
int * cores_used_z__ )

function to extract a not standard gzip2 file

Parameters
Inputfile_arputf-8 encoded input file
OutPutFile_arputf-8 encoded output file
n_threads_z__number of threads to use, 0 to detect and use all the cores or 1 to 128
temp_path_z_S2__the temp path to use, need to be ANSI
cores_used_z__on exit it will set the number of threads used for decompression, because you may select 128 but only four will be used, notice that if you compress a file with 16 threads it will use 16 to extract, even if you select 128
Returns
int
0 - No error
1 - Cannot open input file
2 - Cannot open output file
5 - Cannot read from input file
6 - Cannot write to output file
7 - Invalid gzip2 file
9 - Cannot read from input file
10 - Cannot open input file
11 - Cannot open output file
18 - Unexpected error
19 - User cancel
20 - SHA-256 data error
90 - Invalid gzip2 file
119 - User cancel
403 - File access error
405 - Cannot open output temp file
407 - Cannot create temp file
500 - Unexpected error

◆ zcompress()

int zcompress ( char * input,
char * output,
int level )

◆ zcompress_sha512_k__5()

int zcompress_sha512_k__5 ( char * input,
char * output,
int levelin )

function to compress a not standard gzip2 file

Parameters
inpututf-8 encoded input file
outpututf-8 encoded output file
levelin
Returns
int
0 - No error
7 - Cannot open input file
8 - Cannot open output file
14 - Cannot write to output file
16 - Internal error
19 - User cancel
140 - Unexpected error
401 - Cannot create temp file
402 - Cannot read from input file
403 - File access error
404 - Cannot open temp file

◆ zuncompress__5()

int zuncompress__5 ( char * input,
char * output )

function to extract a not standard gzip2 file

Parameters
inpututf-8 encoded input file
outpututf-8 encoded output file
Returns
int
0 - No error
1 - Cannot open input file
2 - Cannot open output file
5 - Cannot read from input file
6 - Cannot write to output file
7 - Invalid gzip2 file
9 - Cannot read from input file
10 - Cannot open input file
11 - Cannot open output file
18 - Unexpected error
19 - User cancel
20 - SHA-256 data error
90 - Invalid gzip2 file
119 - User cancel
403 - File access error
405 - Cannot open output temp file
407 - Cannot create temp file
500 - Unexpected error

Variable Documentation

◆ cancelflag__5

uint cancelflag__5

◆ cores_used_z__5

int* cores_used_z__5 = NULL

◆ finished__5

uint finished__5

◆ intstatus__5

uint intstatus__5 = 0

◆ is_multi_thread_z__5

bool is_multi_thread_z__5
extern

◆ n_threads_z__5

int n_threads_z__5 = 1

◆ pauseflag__5

uint pauseflag__5

◆ temp_path_z__5

char temp_path_z__5[AMANDA__SIZE]

◆ zlibpercent__5

int zlibpercent__5
extern