MEDIUM: compression: don't compress when no data

This patch makes changes in the http_response_forward_body state
machine. It checks if the compress algorithm had consumed data before
swapping the temporary and the input buffer. So it prevents null sized
zlib chunks.
diff --git a/include/proto/compression.h b/include/proto/compression.h
index fa4c7b7..cfab62a 100644
--- a/include/proto/compression.h
+++ b/include/proto/compression.h
@@ -34,7 +34,7 @@
 int http_compression_buffer_end(struct session *s, struct buffer **in, struct buffer **out, int end);
 
 int identity_init(struct comp_ctx *comp_ctx, int level);
-int identity_add_data(struct comp_ctx *comp_ctx, const char *in_data, int in_len, char *out_data, int out_len);
+int identity_add_data(struct comp_ctx *comp_ctx, const char *in_data, int in_len, struct buffer *out);
 int identity_flush(struct comp_ctx *comp_ctx, struct buffer *out, int flag);
 int identity_reset(struct comp_ctx *comp_ctx);
 int identity_end(struct comp_ctx *comp_ctx);
@@ -43,17 +43,12 @@
 #ifdef USE_ZLIB
 
 int deflate_init(struct comp_ctx *comp_ctx, int level);
-int deflate_add_data(struct comp_ctx *comp_ctx, const char *in_data, int in_len, char *out_data, int out_len);
+int deflate_add_data(struct comp_ctx *comp_ctx, const char *in_data, int in_len, struct buffer *out);
 int deflate_flush(struct comp_ctx *comp_ctx, struct buffer *out, int flag);
 int deflate_reset(struct comp_ctx *comp_ctx);
 int deflate_end(struct comp_ctx *comp_ctx);
 
 int gzip_init(struct comp_ctx *comp_ctx, int level);
-int gzip_add_data(struct comp_ctx *comp_ctx, const char *in_data, int in_len, char *out_data, int out_len);
-int gzip_flush(struct comp_ctx *comp_ctx, struct buffer *out, int flag);
-int gzip_reset(struct comp_ctx *comp_ctx);
-int gzip_end(struct comp_ctx *comp_ctx);
-
 #endif /* USE_ZLIB */
 
 #endif /* _PROTO_COMP_H */