From 6817d07d5e222086bb65e09c35fdf91134031bf4 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 8 May 2023 15:51:14 +0100 Subject: [PATCH] Increase LZ4 block size to 1MB --- renderdoc/serialise/lz4io.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/serialise/lz4io.cpp b/renderdoc/serialise/lz4io.cpp index 67c370af5..218d265b2 100644 --- a/renderdoc/serialise/lz4io.cpp +++ b/renderdoc/serialise/lz4io.cpp @@ -24,7 +24,7 @@ #include "lz4io.h" -static const uint64_t lz4BlockSize = 64 * 1024; +static const uint64_t lz4BlockSize = 1024 * 1024; LZ4Compressor::LZ4Compressor(StreamWriter *write, Ownership own) : Compressor(write, own) { @@ -57,7 +57,7 @@ bool LZ4Compressor::Write(const void *data, uint64_t numBytes) // The basic plan is: // Write into page N incrementally until it is completely full. When full, flush it out to lz4 and // swap pages. - // This keeps lz4 happy with 64kb of history each time it compresses. + // This keeps lz4 happy with 1 block of history each time it compresses. // If we are writing some data the crosses the boundary between pages, we write the part that will // fit on one page, flush & swap, write the rest into the next page. @@ -112,7 +112,7 @@ bool LZ4Compressor::Write(const void *data, uint64_t numBytes) bool LZ4Compressor::Finish() { // This function just writes the current page and closes lz4. Since we assume all blocks are - // precisely 64kb in size + // uniform in size // only the last one can be smaller, so we only write a partial page when finishing. // Calling Write() after Finish() is illegal return FlushPage0();