Added a method to bio_writer_t that allows to skip a number of bytes

A chunk pointing to the skipped bytes is returned, allowing users of
bio_writer_t to write/copy data to the skipped bytes themselves.
This commit is contained in:
Tobias Brunner
2012-08-08 15:41:02 +02:00
parent 59a15a7475
commit 6dfdcf420f
2 changed files with 24 additions and 0 deletions
+9
View File
@@ -125,6 +125,15 @@ struct bio_writer_t {
*/
void (*wrap32)(bio_writer_t *this);
/**
* Skips len bytes in the buffer before the next data is written, returns
* a chunk covering the skipped bytes.
*
* @param len number of bytes to skip
* @return chunk pointing to skipped bytes in the internal buffer
*/
chunk_t (*skip)(bio_writer_t *this, size_t len);
/**
* Get the encoded data buffer.
*