libsqsh v1.5.1
Loading...
Searching...
No Matches
SqshMemoryMapperImpl Struct Reference

The implementation of a memory mapper. More...

#include <sqsh_mapper.h>

Data Fields

size_t block_size_hint
 A hint to libsqsh to use this block size if the user did not specify one.
 
int(* init )(struct SqshMapper *mapper, const void *input, size_t *size)
 The initialization function for the mapper. Use sqsh_mapper_set_user_data() to set custom user data.
 
int(* map )(const struct SqshMapper *mapper, sqsh_index_t offset, size_t size, uint8_t **data)
 The function that maps a block of data into memory.
 
int(* unmap )(const struct SqshMapper *mapper, uint8_t *data, size_t size)
 The function that unmaps a block of data from memory.
 
int(* cleanup )(struct SqshMapper *mapper)
 The cleanup function for the mapper.
 
int(* init2 )(struct SqshMapper *mapper, const void *input, uint64_t *size)
 The initialization function for the mapper. Use sqsh_mapper_set_user_data() to set custom user data.
 
int(* map2 )(const struct SqshMapper *mapper, uint64_t offset, size_t size, uint8_t **data)
 The function that maps a block of data into memory.
 

Detailed Description

The implementation of a memory mapper.

Definition at line 53 of file sqsh_mapper.h.

Field Documentation

◆ block_size_hint

size_t SqshMemoryMapperImpl::block_size_hint

A hint to libsqsh to use this block size if the user did not specify one.

Definition at line 58 of file sqsh_mapper.h.

◆ cleanup

int(* SqshMemoryMapperImpl::cleanup) (struct SqshMapper *mapper)

The cleanup function for the mapper.

Definition at line 85 of file sqsh_mapper.h.

◆ init

int(* SqshMemoryMapperImpl::init) (struct SqshMapper *mapper, const void *input, size_t *size)

The initialization function for the mapper. Use sqsh_mapper_set_user_data() to set custom user data.

Deprecated
Since 1.5.0. Use SqshMemoryMapperImpl::init2() instead.

Definition at line 67 of file sqsh_mapper.h.

◆ init2

int(* SqshMemoryMapperImpl::init2) (struct SqshMapper *mapper, const void *input, uint64_t *size)

The initialization function for the mapper. Use sqsh_mapper_set_user_data() to set custom user data.

Definition at line 91 of file sqsh_mapper.h.

◆ map

int(* SqshMemoryMapperImpl::map) (const struct SqshMapper *mapper, sqsh_index_t offset, size_t size, uint8_t **data)

The function that maps a block of data into memory.

Deprecated
Since 1.5.0. Use SqshMemoryMapperImpl::map2() instead.

Definition at line 75 of file sqsh_mapper.h.

◆ map2

int(* SqshMemoryMapperImpl::map2) (const struct SqshMapper *mapper, uint64_t offset, size_t size, uint8_t **data)

The function that maps a block of data into memory.

Definition at line 95 of file sqsh_mapper.h.

◆ unmap

int(* SqshMemoryMapperImpl::unmap) (const struct SqshMapper *mapper, uint8_t *data, size_t size)

The function that unmaps a block of data from memory.

Definition at line 81 of file sqsh_mapper.h.


The documentation for this struct was generated from the following file: