libropkg: implement compressed file streams and tar-writer functionality
This commit is contained in:
36
libropkg/compress.h
Normal file
36
libropkg/compress.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user