compress: cstream: add support for temporarily moving the cursor and performing limited i/o operations

the cursor can only be moved during uncompressed i/o, and any read/write operations are performed directly on the underlying endpoint with no buffering, and don't count towards the transacted byte statistics.

the cursor can only be moved once, after which it's position must be restored.
This commit is contained in:
2025-07-31 11:18:10 +01:00
parent 10dfa54d5c
commit ede5e72fc2
3 changed files with 83 additions and 0 deletions

View File

@@ -22,4 +22,7 @@ BLUE_API b_status b_cstream_end_compressed_section(
b_cstream *stream, size_t *tx_compressed_bytes,
size_t *tx_uncompressed_bytes);
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);
#endif