Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
dllxz.c File Reference

Main xz lib API definitions. More...

#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>

Macros

#define __attribute__(unused)
 
#define uchar   unsigned char
 
#define uint   unsigned int
 
#define ushort   unsigned short
 
#define AMANDA__SIZE   ((32767 * 6) + 2)
 
#define AMANDA__SIZE_w   (32767)
 
#define __INT32_OR_INT64   int
 

Functions

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....
 
void pedro_dprintf (int amanda_level, char *format,...)
 
int xz_compress (char *inputfile, char *outputfile, int level)
 
int xz_uncompress (char *inputfile, char *outputfile)
 internal function to decompress xz file
 
int __stdcall interface1_9 (__INT32_OR_INT64 argumento1, __INT32_OR_INT64 argumento2, __INT32_OR_INT64 argumento3, __INT32_OR_INT64 argumento4)
 
int __stdcall Compress_xz__9 (char *infile__aakp, char *outfile_rspk, int level_juliete, int threads_____z)
 to compress a file using standard xz compression
 
int __stdcall Uncompress_xz__9 (char *infile__aakp, char *outfile_rspk)
 Function to uncompress a default xz compressed file.
 
int __stdcall Pause_xz__9 (void)
 to pause the execution
 
int __stdcall Resume_xz__9 (void)
 to resume the execution
 
int __stdcall Cancel_xz__9 (void)
 to cancel the execution
 
int __stdcall Returnvalue ()
 to get the last error value, must be 0 if ok
 
int __stdcall Running ()
 to see whether it is running
 
int __stdcall Progress_xz__9 (void)
 To get the progress value.
 

Variables

int threads_z_9
 
int thelevel = 0
 
int running = 0
 
int intpause_9 = 0
 
int intcancel_9 = 0
 
int64_t bytes_processados_m
 
int porcentagem
 

Detailed Description

Main xz lib API definitions.

Author
Ric
Version
1.0.1
Date
2024-dec-30 15:53 AM

Macro Definition Documentation

◆ __attribute__

#define __attribute__ ( unused)
Value:
/* chloe */

◆ __INT32_OR_INT64

#define __INT32_OR_INT64   int

◆ 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

◆ uchar

#define uchar   unsigned char

◆ uint

#define uint   unsigned int

◆ ushort

#define ushort   unsigned short

Function Documentation

◆ Cancel_xz__9()

int __stdcall Cancel_xz__9 ( void )

to cancel the execution

Returns
int 0

◆ Compress_xz__9()

int __stdcall Compress_xz__9 ( char * infile__aakp,
char * outfile_rspk,
int level_juliete,
int threads_____z )

to compress a file using standard xz compression

Parameters
infile__aakpthe utf-8 encoded uncompressed file
outfile_rspkthe utf-8 encoded resulting file
level_julietethe compression level, range from 0 to 9
threads_____zthe number of threads, until version 0.8.4 it need to be 1, due to some problems in the internals of xz lib, as you will see if more than one thread is used it will slow down the execution rather than speeding up (notice that compression level in multi-thread mode is controled internally)
Returns
int
0 - No error
1 - Cannot open input file
2 - Cannot open output file
3 - Error in the initialization of compression
119 - User cancel

◆ interface1_9()

int __stdcall interface1_9 ( __INT32_OR_INT64 argumento1,
__INT32_OR_INT64 argumento2,
__INT32_OR_INT64 argumento3,
__INT32_OR_INT64 argumento4 )

◆ Pause_xz__9()

int __stdcall Pause_xz__9 ( void )

to pause the execution

Returns
int 0

◆ 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
...

◆ Progress_xz__9()

int __stdcall Progress_xz__9 ( void )

To get the progress value.

Returns
int it range from 0 to 10000

◆ Resume_xz__9()

int __stdcall Resume_xz__9 ( void )

to resume the execution

Returns
int 0

◆ Returnvalue()

int __stdcall Returnvalue ( )

to get the last error value, must be 0 if ok

Returns
int the return value, 0 if no error

◆ Running()

int __stdcall Running ( )

to see whether it is running

Returns
int 0 if idle or 1 if running

◆ Uncompress_xz__9()

int __stdcall Uncompress_xz__9 ( char * infile__aakp,
char * outfile_rspk )

Function to uncompress a default xz compressed file.

Parameters
infile__aakputf-8 encoded compressed xz file
outfile_rspkutf-8 encoded destination uncompressed file
Returns
int
0 - No error
1 - Cannot open input file
2 - Cannot open output file
119 - User cancel

◆ xz_compress()

int xz_compress ( char * inputfile,
char * outputfile,
int level )

function to compress files in the standard .xz format the level range from 0 to 9, 9 to best compression

xz files can be decompressed with Winrar

if threads is used the compression level is the default or controled internally, level don't matter (26/sep/2021, 02:45)

◆ xz_uncompress()

int xz_uncompress ( char * inputfile,
char * outputfile )

internal function to decompress xz file

Parameters
inputfile
outputfile
Returns
int

Variable Documentation

◆ bytes_processados_m

int64_t bytes_processados_m

◆ intcancel_9

int intcancel_9 = 0

◆ intpause_9

int intpause_9 = 0

◆ porcentagem

int porcentagem

◆ running

int running = 0

◆ thelevel

int thelevel = 0

◆ threads_z_9

int threads_z_9
extern