RetroArch
Macros | Functions | Variables
archive_file_zlib.c File Reference
#include <stdlib.h>
#include <string.h>
#include <file/archive_file.h>
#include <streams/file_stream.h>
#include <streams/trans_stream.h>
#include <retro_inline.h>
#include <retro_miscellaneous.h>
#include <encodings/crc32.h>
#include <compat/zlib.h>
Include dependency graph for archive_file_zlib.c:

Macros

#define CENTRAL_FILE_HEADER_SIGNATURE   0x02014b50
 
#define END_OF_CENTRAL_DIR_SIGNATURE   0x06054b50
 

Functions

static INLINE uint32_t read_le (const uint8_t *data, unsigned size)
 
static voidzlib_stream_new (void)
 
static void zlib_stream_free (void *stream)
 
static bool zlib_stream_decompress_data_to_file_init (file_archive_file_handle_t *handle, const uint8_t *cdata, uint32_t csize, uint32_t size)
 
static int zlib_stream_decompress_data_to_file_iterate (void *stream)
 
static uint32_t zlib_stream_crc32_calculate (uint32_t crc, const uint8_t *data, size_t length)
 
static bool zip_file_decompressed_handle (file_archive_file_handle_t *handle, const uint8_t *cdata, uint32_t csize, uint32_t size, uint32_t crc32)
 
static int zip_file_decompressed (const char *name, const char *valid_exts, const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size, uint32_t crc32, struct archive_extract_userdata *userdata)
 
static int zip_file_read (const char *path, const char *needle, void **buf, const char *optional_outfile)
 
static int zip_parse_file_init (file_archive_transfer_t *state, const char *file)
 
static int zip_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)
 
static int zip_parse_file_iterate_step (file_archive_transfer_t *state, const char *valid_exts, struct archive_extract_userdata *userdata, file_archive_file_cb file_cb)
 

Variables

const struct file_archive_file_backend zlib_backend
 

Macro Definition Documentation

◆ CENTRAL_FILE_HEADER_SIGNATURE

#define CENTRAL_FILE_HEADER_SIGNATURE   0x02014b50

◆ END_OF_CENTRAL_DIR_SIGNATURE

#define END_OF_CENTRAL_DIR_SIGNATURE   0x06054b50

Function Documentation

◆ read_le()

static INLINE uint32_t read_le ( const uint8_t data,
unsigned  size 
)
static
Here is the caller graph for this function:

◆ zip_file_decompressed()

static int zip_file_decompressed ( const char *  name,
const char *  valid_exts,
const uint8_t cdata,
unsigned  cmode,
uint32_t  csize,
uint32_t  size,
uint32_t  crc32,
struct archive_extract_userdata userdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zip_file_decompressed_handle()

static bool zip_file_decompressed_handle ( file_archive_file_handle_t handle,
const uint8_t cdata,
uint32_t  csize,
uint32_t  size,
uint32_t  crc32 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zip_file_read()

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

◆ zip_parse_file_init()

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

◆ zip_parse_file_iterate_step()

static int zip_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:

◆ zip_parse_file_iterate_step_internal()

static int zip_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 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zlib_stream_crc32_calculate()

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

◆ zlib_stream_decompress_data_to_file_init()

static bool zlib_stream_decompress_data_to_file_init ( file_archive_file_handle_t handle,
const uint8_t cdata,
uint32_t  csize,
uint32_t  size 
)
static
Here is the call graph for this function:

◆ zlib_stream_decompress_data_to_file_iterate()

static int zlib_stream_decompress_data_to_file_iterate ( void stream)
static

◆ zlib_stream_free()

static void zlib_stream_free ( void stream)
static

◆ zlib_stream_new()

static void* zlib_stream_new ( void  )
static

Variable Documentation

◆ zlib_backend

const struct file_archive_file_backend zlib_backend
Initial value:
= {
"zlib"
}
static int zlib_stream_decompress_data_to_file_iterate(void *stream)
Definition: archive_file_zlib.c:102
static bool zlib_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_zlib.c:66
static int zip_file_read(const char *path, const char *needle, void **buf, const char *optional_outfile)
Definition: archive_file_zlib.c:238
static int zip_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_zlib.c:345
static int zip_parse_file_init(file_archive_transfer_t *state, const char *file)
Definition: archive_file_zlib.c:281
static uint32_t zlib_stream_crc32_calculate(uint32_t crc, const uint8_t *data, size_t length)
Definition: archive_file_zlib.c:122
static void * zlib_stream_new(void)
Definition: archive_file_zlib.c:56
static void zlib_stream_free(void *stream)
Definition: archive_file_zlib.c:61