From d2f84f3df899765dad51f401324e4e1acfb600d5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 7 Sep 2020 12:51:00 +0200 Subject: [PATCH] io/BufferedOutputStream: allow specifying the buffer size --- src/fs/io/BufferedOutputStream.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fs/io/BufferedOutputStream.hxx b/src/fs/io/BufferedOutputStream.hxx index b1f9ee662..88096bea9 100644 --- a/src/fs/io/BufferedOutputStream.hxx +++ b/src/fs/io/BufferedOutputStream.hxx @@ -56,8 +56,9 @@ class BufferedOutputStream { DynamicFifoBuffer buffer; public: - explicit BufferedOutputStream(OutputStream &_os) noexcept - :os(_os), buffer(32768) {} + explicit BufferedOutputStream(OutputStream &_os, + size_t buffer_size=32768) noexcept + :os(_os), buffer(buffer_size) {} /** * Write the contents of a buffer.