mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Add CircularBuffer::flush_to_stream
In a similar fashion to what have been done with `fill_from_stream`, this new method allows to write CircularBuffer's data to a Stream without additional copies.
This commit is contained in:
committed by
Andreas Kling
parent
2a91245a96
commit
48b000a36c
@@ -28,6 +28,7 @@ public:
|
||||
Bytes read(Bytes bytes);
|
||||
ErrorOr<void> discard(size_t discarded_bytes);
|
||||
ErrorOr<size_t> fill_from_stream(Stream&);
|
||||
ErrorOr<size_t> flush_to_stream(Stream&);
|
||||
|
||||
/// Compared to `read()`, this starts reading from an offset that is `distance` bytes
|
||||
/// before the current write pointer and allows for reading already-read data.
|
||||
|
||||
Reference in New Issue
Block a user