From 8865c6ae3ba5570be95d0c1aae3e9bc68d029c1f Mon Sep 17 00:00:00 2001 From: Maxim Date: Sat, 16 Nov 2024 23:33:07 +0000 Subject: [PATCH] Add a comment describing the format --- compressors/gfxcomp_wbmw.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compressors/gfxcomp_wbmw.cpp b/compressors/gfxcomp_wbmw.cpp index dbb7622..861deec 100644 --- a/compressors/gfxcomp_wbmw.cpp +++ b/compressors/gfxcomp_wbmw.cpp @@ -5,6 +5,13 @@ #include "utils.h" #include "rle.h" +// Compression format: +// - Data is processed one bitplane at a time +// - For each bitplane: +// - %0nnnnnnn = RLE run of n bytes, 1<=n<=127 +// - %1nnnnnnn = raw run of n bytes (byte is negated count), 1<=n<=128 +// - %00000000 = end of bitplane + void compressPlane( std::vector& destination, const std::vector::const_iterator& source,