summaryrefslogtreecommitdiff
path: root/AK/CircularBuffer.h
AgeCommit message (Collapse)Author
2023-04-05AK: Report copied bytes when seekback copying from CircularBufferTim Schumacher
Otherwise, we have no way of determining whether our copy was truncated by accident.
2023-03-31AK+LibCompress: Remove the Deflate back-reference intermediate bufferTimothy Flynn
Instead of reading bytes from the output stream into a buffer, just to immediately write them back out, we can skip the middle-man and copy the bytes directly into the output buffer.
2023-03-30AK: Remove arbitrary 1 KB limit when filling a BufferedStream's bufferTimothy Flynn
When reading, we currently only fill a BufferedStream's buffer when it is empty, and only with 1 KB of data. This means that while the buffer defaults to a size of 16 KB, at least 15 KB is always unused.
2023-03-21AK: Expose the seekback limit of CircularBufferTim Schumacher
2023-01-14AK: Add an optional starting offset to `CircularBuffer::offset_of`Lucas CHOLLET
This parameter allows to start searching after an offset. For example, to resume a search. It is unfortunately a breaking change in API so this patch also modifies one user and one test.
2023-01-14AK: Default move operators for `CircularBuffer`Lucas CHOLLET
The previously defined operator was swap-based. With the defaulted implementation, both integers are now copied, but it doesn't matter as only the `ByteBuffer` allocates memory (i.e. non-null integers values won't affect the destruction).
2023-01-13AK: Add `CircularBuffer::read_with_seekback`Tim Schumacher
2022-12-31AK: Add `CircularBuffer`Lucas CHOLLET
The class is very similar to `CircularDuplexStream` in its behavior. Main differences are that `CircularBuffer`: - does not inherit from `AK::Stream` - uses `ErrorOr` for its API - is heap allocated (and OOM-Safe) This patch also add some tests.