RetroArch
Classes | Macros | Functions | Variables
archive_file_7z.c File Reference
#include <stdlib.h>
#include <boolean.h>
#include <file/archive_file.h>
#include <streams/file_stream.h>
#include <retro_miscellaneous.h>
#include <encodings/utf.h>
#include <encodings/crc32.h>
#include <string/stdstring.h>
#include <lists/string_list.h>
#include <file/file_path.h>
#include <compat/strl.h>
#include <7zip/7z.h>
#include <7zip/7zCrc.h>
#include <7zip/7zFile.h>
Include dependency graph for archive_file_7z.c:

Classes

struct  sevenzip_context_t
 

Macros

#define SEVENZIP_MAGIC   "7z\xBC\xAF\x27\x1C"
 
#define SEVENZIP_MAGIC_LEN   6
 

Functions

static voidsevenzip_stream_alloc_impl (void *p, size_t size)
 
static void sevenzip_stream_free_impl (void *p, void *address)
 
static voidsevenzip_stream_alloc_tmp_impl (void *p, size_t size)
 
static voidsevenzip_stream_new (void)
 
static void sevenzip_stream_free (void *data)
 
static int sevenzip_file_read (const char *path, const char *needle, void **buf, const char *optional_outfile)
 
static bool sevenzip_stream_decompress_data_to_file_init (file_archive_file_handle_t *handle, const uint8_t *cdata, uint32_t csize, uint32_t size)
 
static int sevenzip_stream_decompress_data_to_file_iterate (void *data)
 
static int sevenzip_parse_file_init (file_archive_transfer_t *state, const char *file)
 
static int sevenzip_parse_file_iterate_step_internal (file_archive_transfer_t *state, char *filename, const uint8_t **cdata, unsigned *cmode, uint32_t *size, uint32_t *csize, uint32_t *checksum, unsigned *payback, struct archive_extract_userdata *userdata)
 
static int sevenzip_parse_file_iterate_step (file_archive_transfer_t *state, const char *valid_exts, struct archive_extract_userdata *userdata, file_archive_file_cb file_cb)
 
static uint32_t sevenzip_stream_crc32_calculate (uint32_t crc, const uint8_t *data, size_t length)
 

Variables

const struct file_archive_file_backend sevenzip_backend
 

Macro Definition Documentation

◆ SEVENZIP_MAGIC

#define SEVENZIP_MAGIC   "7z\xBC\xAF\x27\x1C"

◆ SEVENZIP_MAGIC_LEN

#define SEVENZIP_MAGIC_LEN   6

Function Documentation

◆ sevenzip_file_read()

static int sevenzip_file_read ( const char *  path,
const char *  needle,
void **  buf,
const char *  optional_outfile 
)
static
Here is the call graph for this function:

◆ sevenzip_parse_file_init()

static int sevenzip_parse_file_init ( file_archive_transfer_t state,
const char *  file 
)
static
Here is the call graph for this function:

◆ sevenzip_parse_file_iterate_step()

static int sevenzip_parse_file_iterate_step ( file_archive_transfer_t state,
const char *  valid_exts,
struct archive_extract_userdata userdata,
file_archive_file_cb  file_cb 
)
static
Here is the call graph for this function:

◆ sevenzip_parse_file_iterate_step_internal()

static int sevenzip_parse_file_iterate_step_internal ( file_archive_transfer_t state,
char *  filename,
const uint8_t **  cdata,
unsigned *  cmode,
uint32_t size,
uint32_t csize,
uint32_t checksum,
unsigned *  payback,
struct archive_extract_userdata userdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sevenzip_stream_alloc_impl()

static void* sevenzip_stream_alloc_impl ( void p,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sevenzip_stream_alloc_tmp_impl()

static void* sevenzip_stream_alloc_tmp_impl ( void p,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sevenzip_stream_crc32_calculate()

static uint32_t sevenzip_stream_crc32_calculate ( uint32_t  crc,
const uint8_t data,
size_t  length 
)
static
Here is the call graph for this function:

◆ sevenzip_stream_decompress_data_to_file_init()

static bool sevenzip_stream_decompress_data_to_file_init ( file_archive_file_handle_t handle,
const uint8_t cdata,
uint32_t  csize,
uint32_t  size 
)
static

◆ sevenzip_stream_decompress_data_to_file_iterate()

static int sevenzip_stream_decompress_data_to_file_iterate ( void data)
static
Here is the call graph for this function:

◆ sevenzip_stream_free()

static void sevenzip_stream_free ( void data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sevenzip_stream_free_impl()

static void sevenzip_stream_free_impl ( void p,
void address 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sevenzip_stream_new()

static void* sevenzip_stream_new ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sevenzip_backend

const struct file_archive_file_backend sevenzip_backend
Initial value:
= {
"7z"
}
static int sevenzip_parse_file_iterate_step(file_archive_transfer_t *state, const char *valid_exts, struct archive_extract_userdata *userdata, file_archive_file_cb file_cb)
Definition: archive_file_7z.c:463
static int sevenzip_stream_decompress_data_to_file_iterate(void *data)
Definition: archive_file_7z.c:321
static bool sevenzip_stream_decompress_data_to_file_init(file_archive_file_handle_t *handle, const uint8_t *cdata, uint32_t csize, uint32_t size)
Definition: archive_file_7z.c:306
static int sevenzip_file_read(const char *path, const char *needle, void **buf, const char *optional_outfile)
Definition: archive_file_7z.c:127
static void sevenzip_stream_free(void *data)
Definition: archive_file_7z.c:104
static void * sevenzip_stream_new(void)
Definition: archive_file_7z.c:86
static int sevenzip_parse_file_init(file_archive_transfer_t *state, const char *file)
Definition: archive_file_7z.c:346
static uint32_t sevenzip_stream_crc32_calculate(uint32_t crc, const uint8_t *data, size_t length)
Definition: archive_file_7z.c:500