Generic Trace Generator (GTG)  0.1
GTGCompress.h
Go to the documentation of this file.
00001 #ifndef GTG_COMPRESS_H
00002 #define GTG_COMPRESS_H
00003 
00004 #include <stdint.h>
00005 #include <stdio.h>
00006 #include <zlib.h>
00007 
00008 /* compress a buffer into another buffer */
00009 int gtg_compress_m2m(z_stream *z, void* in_buf, uint32_t len, void* out_buf, uint32_t out_max_len);
00010 /* compress a buffer and save the result in a file */
00011 int gtg_compress_m2f(z_stream *z, void* in_buf, uint32_t len, FILE* file_out);
00012 /* compress a file into a buffer */
00013 int gtg_compress_f2m(z_stream *z, FILE* file_in, void* out_buf, uint32_t out_max_len);
00014 /* compress a file into another file */
00015 int gtg_compress_f2f(z_stream *z, FILE* file_in, FILE* file_out);
00016 
00017 /* save functions for decompression */
00018 int gtg_decompress_m2m(z_stream *z, void* in_buf, uint32_t len, void* out_buf, uint32_t out_max_len);
00019 int gtg_decompress_m2f(z_stream *z, void* in_buf, uint32_t len, FILE* file_out);
00020 int gtg_decompress_f2m(z_stream *z, FILE* file_in, void* out_buf, uint32_t out_max_len);
00021 int gtg_decompress_f2f(z_stream *z, FILE* file_in, FILE* file_out);
00022 
00023 int gtg_compress_init(z_stream *z, int compression_ratio);
00024 int gtg_decompress_init(z_stream *z);
00025 
00026 #endif  /* GTG_COMPRESS_H */