compress: move compression mode enum to function.h

This commit is contained in:
2025-07-30 18:30:31 +01:00
parent e4c4de94b8
commit 051d371eb5
7 changed files with 25 additions and 23 deletions

View File

@@ -8,15 +8,12 @@
struct b_ringbuffer;
struct b_compression_function;
enum b_compression_mode;
typedef struct b_compressor b_compressor;
typedef enum b_compressor_mode {
B_COMPRESSOR_MODE_COMPRESS,
B_COMPRESSOR_MODE_DECOMPRESS,
} b_compressor_mode;
BLUE_API b_status b_compressor_create(
const struct b_compression_function *func, b_compressor_mode mode,
const struct b_compression_function *func, enum b_compression_mode mode,
struct b_ringbuffer *inbuf, struct b_ringbuffer *outbuf,
b_compressor **out);
BLUE_API b_status b_compressor_destroy(b_compressor *compressor);

View File

@@ -13,10 +13,15 @@ typedef enum b_compression_function_id {
B_COMPRESSOR_FUNCTION_ZSTD,
} b_compression_function_id;
typedef enum b_compression_mode {
B_COMPRESSION_MODE_COMPRESS,
B_COMPRESSION_MODE_DECOMPRESS,
} b_compression_mode;
BLUE_API const b_compression_function *b_compression_function_get_by_id(
b_compression_function_id id);
BLUE_API b_status b_compression_function_get_buffer_size(
const b_compression_function *func, enum b_compressor_mode mode,
const b_compression_function *func, enum b_compression_mode mode,
size_t *inbuf_size, size_t *outbuf_size);
#endif