From b81beecdf10cf74153df5ae33aed972c6b34f86e Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 27 Jan 2024 10:19:02 +0100 Subject: [PATCH] RTech: add info about small pak file's ring buffers --- src/public/rtech/ipakfile.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/public/rtech/ipakfile.h b/src/public/rtech/ipakfile.h index 1c4d74ea..45080d23 100644 --- a/src/public/rtech/ipakfile.h +++ b/src/public/rtech/ipakfile.h @@ -49,11 +49,19 @@ // first before falling back to PLATFORM_PAK_PATH #define PLATFORM_PAK_OVERRIDE_PATH PAK_BASE_PATH"Win64_override\\" -// input stream ring buffer size for pak decoder before wrapping around +// the minimum stream ring buffer size when a pak is loaded who's compressed +// size is below PAK_DECODE_IN_RING_BUFFER_SIZE, the system allocates a +// buffer with the size of the compressed pak + the value of this define +// the system should still use the default ring buffer input size for decoding +// as these pak files get decoded in one-go; there is buffer wrapping going on +#define PAK_DECODE_IN_RING_BUFFER_SMALL_SIZE 0x1000 +#define PAK_DECODE_IN_RING_BUFFER_SMALL_MASK (PAK_DECODE_IN_RING_BUFFER_SMALL_SIZE-1) + +// the input stream ring buffer size for pak decoder before wrapping around #define PAK_DECODE_IN_RING_BUFFER_SIZE 0x1000000 #define PAK_DECODE_IN_RING_BUFFER_MASK (PAK_DECODE_IN_RING_BUFFER_SIZE-1) -// output stream ring buffer size in which input buffer gets decoded to, we +// the output stream ring buffer size in which input buffer gets decoded to, we // can only decode up to this many bytes before we have to wrap around #define PAK_DECODE_OUT_RING_BUFFER_SIZE 0x400000 #define PAK_DECODE_OUT_RING_BUFFER_MASK (PAK_DECODE_OUT_RING_BUFFER_SIZE-1)