Skip to content

File syn_lz4.h

File List > src > syntropic > util > syn_lz4.h

Go to the documentation of this file

#ifndef SYN_LZ4_H
#define SYN_LZ4_H

#include "../common/syn_defs.h"

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifndef SYN_LZ4_HASH_SIZE
#define SYN_LZ4_HASH_SIZE 4096U 
#endif

typedef struct {
    uint16_t hash_table[SYN_LZ4_HASH_SIZE]; 
} SYN_Lz4;

SYN_Status syn_lz4_init(SYN_Lz4 *ctx);

size_t syn_lz4_compress_bound(size_t input_size);

size_t syn_lz4_compress(SYN_Lz4 *ctx, const void *src, size_t src_size, void *dst,
                        size_t dst_capacity);

size_t syn_lz4_decompress(const void *src, size_t src_size, void *dst, size_t dst_capacity);

#ifdef __cplusplus
}
#endif

#endif /* SYN_LZ4_H */