From e7f97a4c8da44a696bb7e71b9dd54e8d271e24d0 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 8 Dec 2014 16:12:01 +0100 Subject: added more unit test for the new BufferClass, fixed a few bugs (merely inefficiencies -- no major problems found so far) --- src/core/utils/CharReader.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/core/utils/CharReader.hpp') diff --git a/src/core/utils/CharReader.hpp b/src/core/utils/CharReader.hpp index 4986d3e..23e88b7 100644 --- a/src/core/utils/CharReader.hpp +++ b/src/core/utils/CharReader.hpp @@ -63,9 +63,17 @@ public: private: /** - * Number of bytes to request from the input stream. + * Number of bytes to request from the input stream. Set to 64 KiB because + * this seems to be a nice value for I/O operations according to multiple + * sources. */ - static constexpr size_t REQUEST_SIZE = 16 * 1024; + static constexpr size_t REQUEST_SIZE = 64 * 1024; + + /** + * Number of bytes the buffer guarantees to be capable of looking back + * for extracting the current context. + */ + static constexpr size_t LOOKBACK_SIZE = 128; /** * Type used internally to represent one chunk of memory. -- cgit v1.2.3