Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
zlib.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 <process.h>
#include "stdio_v2.h"
#include "win64.h"
#include <zlib.h>
#include "gzip2_include.h"
#include "gzip2_decoder_mt_z.c"

Data Structures

struct  _rspdata
 

Macros

#define ARP_USE_ENHANCED_STDIO
 
#define SHA512_DIGEST_LENGTH   64
 
#define uchar   unsigned char
 
#define uint   unsigned int
 
#define ulong   unsigned long
 
#define ushort   unsigned short
 
#define AMANDA__SIZE   ((32767 * 6) + 2)
 
#define AMANDA__SIZE_w   (32767)
 
#define __amandacall   __stdcall
 
#define AMANDA__SIZE_ww   ((32767 * 2) + 2)
 
#define CHUNK   131072
 

Typedefs

typedef struct _rspdata rspdata
 

Functions

__int64 lffilesize_gzip2 (const char *szFileName)
 funcao repetida pra pegar o tamanho do arquivo em utf-8
 
WCHAR * utf8_2_wide_dl (const char *pUTF8)
 my temporary utf8_2_wide_dl function to add full Unicode support and future (when modified) support to long filenames. (jan/2025)
 
void pedro_dprintf2 (int amanda_level, char *format,...)
 pedro_dprintf2 is my variant of my debug function because too much calls to pedro_dprintf these days, I am lazy, sorry....
 
int __fastcall compress2_uncompress_k_real_mt_z_21 (char *input_z, char *output_z)
 
int zuncompress_sha512_k_mt_z (char *input, char *output)
 
int __amandacall get_multithread_progress__5 (void)
 
uint32_t tuklib_cpucores_z__5 (void)
 Borrowed from XZ compression.
 
int print (void)
 
void pedro_dprintf (int amanda_level, char *format,...)
 
int zuncompress_sha512_k__5 (char *input, char *output)
 
void * sha512_init_k (void)
 
void sha512_update_k (void *ctx, unsigned char *buffer_k, unsigned int len_k)
 
void sha512_final_k (void *ctx, unsigned char *array_digest_64_bytes)
 
void __cdecl mprintf (char *format,...)
 
uint getpor (int max, uint fatia)
 
void dprintf (char *format,...)
 
int __stdcall execute ()
 
int start ()
 
int start2 ()
 
__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)
 
int createtempfilename_and_keep_z_5 (char *path1, char *out_z, char *signature_z)
 
unsigned __stdcall my_thread_function__5 (void *my_argument_z)
 
int zcompress_sha512_k__5 (char *input, char *output, int levelin)
 function to compress a not standard gzip2 file
 
int zuncompress__5 (char *input, char *output)
 function to extract a not standard gzip2 file
 

Variables

char zlib_error_z [1024]
 
int zlib_int_error_z
 
int64_t max_memory_size_j = 0
 
CRITICAL_SECTION lpCriticalSection_charli_gzip2
 
bool is_multi_thread_z__5 = false
 
int n_threads_z__5
 
char temp_path_z__5 []
 
uint pauseflag__5
 
uint cancelflag__5
 
int finished__5
 
int zlibpercent__5 = 0
 
int64_t totalbytes_z__5
 
int64_t bytes__read_thread_z__5 [129]
 
__INT32_OR_INT64 my_thread_handle__5 [129]
 
char temp_files_z__5 [129][2048]
 
int thread_return_value_z__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

◆ ARP_USE_ENHANCED_STDIO

#define ARP_USE_ENHANCED_STDIO

◆ CHUNK

#define CHUNK   131072

◆ SHA512_DIGEST_LENGTH

#define SHA512_DIGEST_LENGTH   64

◆ uchar

#define uchar   unsigned char

◆ uint

#define uint   unsigned int

◆ ulong

#define ulong   unsigned long

◆ ushort

#define ushort   unsigned short

Typedef Documentation

◆ rspdata

typedef struct _rspdata rspdata

Function Documentation

◆ compress2_uncompress_k_real_mt_z_21()

int __fastcall compress2_uncompress_k_real_mt_z_21 ( char * input_z,
char * output_z )

◆ createtempfilename_and_keep_z_5()

int createtempfilename_and_keep_z_5 ( char * path1,
char * out_z,
char * signature_z )

◆ dprintf()

void dprintf ( char * format,
... )

◆ execute()

int __stdcall execute ( )

◆ get_multithread_progress__5()

int __amandacall get_multithread_progress__5 ( void )

◆ getpor()

uint getpor ( int max,
uint fatia )

◆ 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

◆ lffilesize_gzip2()

__int64 lffilesize_gzip2 ( const char * szFileName)

funcao repetida pra pegar o tamanho do arquivo em utf-8

Parameters
szFileNameutf-8 encoded filename
Returns
__int64 the size or 0 if error (its ok for my point of view)

◆ mprintf()

void __cdecl mprintf ( char * format,
... )
extern

◆ my_thread_function__5()

unsigned __stdcall my_thread_function__5 ( void * my_argument_z)

◆ pedro_dprintf()

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

◆ pedro_dprintf2()

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

pedro_dprintf2 is my variant of my debug function because too much calls to pedro_dprintf these days, I am lazy, sorry....

em brotli or brotli2

Parameters
amanda_levelif equal or above 0 print the string
formatprintf based format
...

◆ print()

int print ( void )

◆ sha512_final_k()

void sha512_final_k ( void * ctx,
unsigned char * array_digest_64_bytes )

◆ sha512_init_k()

void * sha512_init_k ( void )

◆ sha512_update_k()

void sha512_update_k ( void * ctx,
unsigned char * buffer_k,
unsigned int len_k )

◆ start()

int start ( )

◆ start2()

int start2 ( )

◆ tuklib_cpucores_z__5()

uint32_t tuklib_cpucores_z__5 ( void )

Borrowed from XZ compression.

◆ utf8_2_wide_dl()

WCHAR * utf8_2_wide_dl ( const char * pUTF8)

my temporary utf8_2_wide_dl function to add full Unicode support and future (when modified) support to long filenames. (jan/2025)

Parameters
pUTF8
Returns
WCHAR*

◆ 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

◆ zuncompress_sha512_k__5()

int zuncompress_sha512_k__5 ( char * input,
char * output )

◆ zuncompress_sha512_k_mt_z()

int zuncompress_sha512_k_mt_z ( char * input,
char * output )

Variable Documentation

◆ bytes__read_thread_z__5

int64_t bytes__read_thread_z__5[129]

◆ cancelflag__5

uint cancelflag__5
extern

◆ finished__5

int finished__5
extern

◆ is_multi_thread_z__5

bool is_multi_thread_z__5 = false

◆ lpCriticalSection_charli_gzip2

CRITICAL_SECTION lpCriticalSection_charli_gzip2

◆ max_memory_size_j

int64_t max_memory_size_j = 0

◆ my_thread_handle__5

__INT32_OR_INT64 my_thread_handle__5[129]

◆ n_threads_z__5

int n_threads_z__5
extern

◆ pauseflag__5

uint pauseflag__5
extern

◆ temp_files_z__5

char temp_files_z__5[129][2048]

◆ temp_path_z__5

char temp_path_z__5[]
extern

◆ thread_return_value_z__5

int thread_return_value_z__5

◆ totalbytes_z__5

int64_t totalbytes_z__5

◆ zlib_error_z

char zlib_error_z[1024]

◆ zlib_int_error_z

int zlib_int_error_z

◆ zlibpercent__5

int zlibpercent__5 = 0