![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
#include <brotli/shared_dictionary.h>#include <memory.h>#include <stdlib.h>#include <stdio.h>#include "dictionary.h"#include "platform.h"#include "shared_dictionary_internal.h"Functions | |
| void | BrotliSharedDictionaryDestroyInstance (BrotliSharedDictionary *dict) |
| BROTLI_BOOL | BrotliSharedDictionaryAttach (BrotliSharedDictionary *dict, BrotliSharedDictionaryType type, size_t data_size, const uint8_t data[BROTLI_ARRAY_PARAM(data_size)]) |
| BrotliSharedDictionary * | BrotliSharedDictionaryCreateInstance (brotli_alloc_func alloc_func, brotli_free_func free_func, void *opaque) |
| BROTLI_BOOL BrotliSharedDictionaryAttach | ( | BrotliSharedDictionary * | dict, |
| BrotliSharedDictionaryType | type, | ||
| size_t | data_size, | ||
| const uint8_t | data[BROTLI_ARRAY_PARAM(data_size)] ) |
Attaches dictionary to a given instance of BrotliSharedDictionary.
Dictionary to be attached is represented in a serialized format as a region of memory.
Provided data it partially referenced by a resulting (compound) dictionary, and should be kept untouched, while at least one compound dictionary uses it. This way memory overhead is kept minimal by the cost of additional resource management.
| dict | dictionary to extend |
| type | type of dictionary to attach |
| data_size | size of data |
| data | serialized dictionary of type type, with at least data_size addressable bytes |
| BrotliSharedDictionary * BrotliSharedDictionaryCreateInstance | ( | brotli_alloc_func | alloc_func, |
| brotli_free_func | free_func, | ||
| void * | opaque ) |
Creates an instance of BrotliSharedDictionary.
Fresh instance has default word dictionary and transforms and no LZ77 prefix dictionary.
alloc_func and free_func MUST be both zero or both non-zero. In the case they are both zero, default memory allocators are used. opaque is passed to alloc_func and free_func when they are called. free_func has to return without doing anything when asked to free a NULL pointer.
| alloc_func | custom memory allocation function |
| free_func | custom memory free function |
| opaque | custom memory manager handle |
0 if instance can not be allocated or initialized | void BrotliSharedDictionaryDestroyInstance | ( | BrotliSharedDictionary * | dict | ) |
Deinitializes and frees BrotliSharedDictionary instance.
| dict | shared dictionary instance to be cleaned up and deallocated |