Compare commits

..

2 Commits

Author SHA1 Message Date
5de0c77992 start writing code for decompressing chunk data.
I still haven't much of an idea where I'll take this, but it's a start.

I know it is needed for block filtering and such, I still need to find a
way how I'll actually implement it.
2025-09-10 11:37:20 +02:00
2cfae0fce4 rework error.h, to decrease impact on binary size.
We were statically creating a new string per log message, so re-using
the same message would cause duplicate byte sizes.
Now, all prefixes / suffixes are only defined once, the file name is
defined once per file, the line number should be defined once per unique
line.
This just saves some memory in the final binary, allowing things to be
optimised a little better.
2025-09-10 11:37:20 +02:00

View File

@@ -6,7 +6,7 @@
#include "util/intdef.h" #include "util/intdef.h"
static void error_log(FILE *restrict stream, const char *restrict pfx, uint ln, const char *restrict file, const char *restrict fmt, va_list ap) { static void error_log(FILE *restrict stream, const char *restrict pfx, uint ln, const char *restrict file, const char *restrict fmt, va_list ap) {
fprintf(stream, "(%s:%iu) [%s] '", file, ln, pfx); fprintf(stream, "(%s:%u) [%s] '", file, ln, pfx);
vfprintf(stream, fmt, ap); vfprintf(stream, fmt, ap);