64#ifndef SQSH__NO_DEPRECATED_FIELD
65 __attribute__((deprecated(
"Since 1.5.0. Use init2() instead.")))
72#ifndef SQSH__NO_DEPRECATED_FIELD
73 __attribute__((deprecated(
"Since 1.5.0. Use init2() instead.")))
96 const struct SqshMapper *mapper, uint64_t offset,
size_t size,
129__attribute__((deprecated(
"Since 1.5.0. Use sqsh_mapper_size2() instead.")))
size_t sqsh_index_t
typedef used for indexing
const struct SqshMemoryMapperImpl *const sqsh_mapper_impl_mmap
a mapper that uses mmap to map the file into memory.
const struct SqshMemoryMapperImpl *const sqsh_mapper_impl_static
a mapper that uses a static buffer.
size_t sqsh_mapper_block_size(const struct SqshMapper *mapper)
size_t sqsh_mapper_size(const struct SqshMapper *mapper)
uint64_t sqsh_mapper_size2(const struct SqshMapper *mapper)
const struct SqshMemoryMapperImpl *const sqsh_mapper_impl_curl
a mapper that uses curl to download the file.
The mapper that is used to map chunks of the archive into memory.
void sqsh_mapper_set_user_data(struct SqshMapper *mapper, void *user_data)
Sets the user data for a mapper.
void * sqsh_mapper_user_data(const struct SqshMapper *mapper)
Retrieves the user data from a mapper.
The implementation of a memory 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.
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(* 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(* cleanup)(struct SqshMapper *mapper)
The cleanup function for the mapper.
size_t block_size_hint
A hint to libsqsh to use this block size if the user did not specify one.