mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
AK: Remove OutputMemoryStream for DuplexMemoryStream.
OutputMemoryStream was originally a proxy for DuplexMemoryStream that did not expose any reading API. Now I need to add another class that is like OutputMemoryStream but only for static buffers. My first idea was to make OutputMemoryStream do that too, but I think it's much better to have a distinct class for that. I originally wanted to call that class FixedOutputMemoryStream but that name is really cumbersome and it's a bit unintuitive because InputMemoryStream is already reading from a fixed buffer. So let's just use DuplexMemoryStream instead of OutputMemoryStream for any dynamic stuff and create a new OutputMemoryStream for static buffers.
This commit is contained in:
parent
c9a3a5b488
commit
f18e927827
6 changed files with 10 additions and 28 deletions
|
@ -164,7 +164,7 @@ Optional<ByteBuffer> GzipDecompressor::decompress_all(ReadonlyBytes bytes)
|
|||
{
|
||||
InputMemoryStream memory_stream { bytes };
|
||||
GzipDecompressor gzip_stream { memory_stream };
|
||||
OutputMemoryStream output_stream;
|
||||
DuplexMemoryStream output_stream;
|
||||
|
||||
u8 buffer[4096];
|
||||
while (!gzip_stream.has_any_error() && !gzip_stream.unreliable_eof()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue