mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-06 01:21:24 -04:00
[cmp] update Bled to latest
* Also ensure that we support Unicode paths for 7-zip * Also ensure that error messages are displayed in English
This commit is contained in:
parent
ad918c8f74
commit
71ede6d9a0
11 changed files with 187 additions and 69 deletions
|
@ -19,6 +19,7 @@ typedef void (*printf_t) (const char* format, ...);
|
|||
typedef void (*progress_t) (const uint64_t read_bytes);
|
||||
typedef int (*read_t)(int fd, void* buf, unsigned int count);
|
||||
typedef int (*write_t)(int fd, const void* buf, unsigned int count);
|
||||
typedef void (*switch_t)(const char* filename, const uint64_t size);
|
||||
|
||||
typedef enum {
|
||||
BLED_COMPRESSION_NONE = 0,
|
||||
|
@ -41,6 +42,9 @@ int64_t bled_uncompress_with_handles(HANDLE hSrc, HANDLE hDst, int type);
|
|||
/* Uncompress file 'src', compressed using 'type', to buffer 'buf' of size 'size' */
|
||||
int64_t bled_uncompress_to_buffer(const char* src, char* buf, size_t size, int type);
|
||||
|
||||
/* Uncompress all files from archive 'src', compressed using 'type', to destination dir 'dir' */
|
||||
int64_t bled_uncompress_to_dir(const char* src, const char* dir, int type);
|
||||
|
||||
/* Uncompress buffer 'src' of length 'src_len' to buffer 'dst' of size 'dst_len' */
|
||||
int64_t bled_uncompress_from_buffer_to_buffer(const char* src, const size_t src_len, char* dst, size_t dst_len, int type);
|
||||
|
||||
|
@ -51,10 +55,12 @@ int64_t bled_uncompress_from_buffer_to_buffer(const char* src, const size_t src_
|
|||
* - specify the read/write functions you want to use;
|
||||
* - specify the function you want to use to display progress, based on number of source archive bytes read
|
||||
* void progress_function(const uint64_t read_bytes);
|
||||
* - specify the function you want to use when switching files in an archive
|
||||
* void switch_function(const char* filename, const uint64_t filesize);
|
||||
* - point to an unsigned long variable, to be used to cancel operations when set to non zero
|
||||
*/
|
||||
int bled_init(printf_t print_function, read_t read_function, write_t write_function,
|
||||
progress_t progress_function, unsigned long* cancel_request);
|
||||
progress_t progress_function, switch_t switch_function, unsigned long* cancel_request);
|
||||
|
||||
/* This call frees any resource used by the library */
|
||||
void bled_exit(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue