37 lines
833 B
C
37 lines
833 B
C
|
|
#ifndef COMPRESS_H_
|
||
|
|
#define COMPRESS_H_
|
||
|
|
|
||
|
|
#include <ropkg/compress.h>
|
||
|
|
|
||
|
|
struct ropkg_compression_function {
|
||
|
|
const char *f_name;
|
||
|
|
const char *f_extension;
|
||
|
|
enum ropkg_status (*f_buffer_size)(
|
||
|
|
enum ropkg_compression_stream_mode,
|
||
|
|
size_t *,
|
||
|
|
size_t *);
|
||
|
|
enum ropkg_status (*f_open)(
|
||
|
|
const struct ropkg_compression_function *,
|
||
|
|
enum ropkg_compression_stream_mode,
|
||
|
|
void *,
|
||
|
|
size_t,
|
||
|
|
void *,
|
||
|
|
size_t,
|
||
|
|
struct ropkg_compression_stream **);
|
||
|
|
enum ropkg_status (*f_close)(struct ropkg_compression_stream *);
|
||
|
|
enum ropkg_status (*f_process)(
|
||
|
|
struct ropkg_compression_stream *,
|
||
|
|
size_t,
|
||
|
|
enum ropkg_compression_stream_op,
|
||
|
|
size_t *);
|
||
|
|
};
|
||
|
|
|
||
|
|
struct ropkg_compression_stream {
|
||
|
|
const struct ropkg_compression_function *s_func;
|
||
|
|
enum ropkg_compression_stream_mode s_mode;
|
||
|
|
void *s_in, *s_out;
|
||
|
|
size_t s_in_max, s_out_max;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|