compress: cstream: record the total number of bytes that pass through the endpoint across all (un)compressed sections
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <blue/compress/function.h>
|
||||
#include <blue/core/stream.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct b_cstream b_cstream;
|
||||
|
||||
@@ -21,6 +22,12 @@ BLUE_API b_status b_cstream_begin_compressed_section(
|
||||
BLUE_API b_status b_cstream_end_compressed_section(
|
||||
b_cstream *stream, size_t *tx_compressed_bytes,
|
||||
size_t *tx_uncompressed_bytes);
|
||||
BLUE_API bool b_cstream_in_compressed_section(const b_cstream *stream);
|
||||
BLUE_API b_status b_cstream_tx_bytes(const b_cstream *stream, size_t *out);
|
||||
BLUE_API b_status b_cstream_tx_bytes_compressed(
|
||||
const b_cstream *stream, size_t *out);
|
||||
BLUE_API b_status b_cstream_tx_bytes_uncompressed(
|
||||
const b_cstream *stream, size_t *out);
|
||||
|
||||
BLUE_API b_status b_cstream_set_cursor_position(b_cstream *stream, size_t pos);
|
||||
BLUE_API b_status b_cstream_restore_cursor_position(b_cstream *stream);
|
||||
|
||||
Reference in New Issue
Block a user