register paks

This commit is contained in:
Nishi 2026-01-10 01:59:34 +09:00
commit bc6340588e
Signed by: nishi
GPG key ID: 27EF69B208EB9343
2 changed files with 20 additions and 3 deletions

View file

@ -13,7 +13,9 @@ typedef struct kv {
} kv_t;
static FILE* out;
static FILE* out;
static unsigned int total = 0;
static unsigned int totalact = 0, totalcmp = 0;
static void scan(const char* path, const char* pre);
@ -72,6 +74,10 @@ static void pack(const char* fullpath, const char* path) {
fwrite(output, 1, outsz, out);
printf("done (%6d -> %6d)\n", insz, outsz);
total++;
totalact += insz;
totalcmp += outsz;
} else {
printf("failed\n");
}
@ -188,5 +194,7 @@ int main(int argc, char** argv) {
memset(dat, 0, 128);
fwrite(dat, 1, 128, out);
printf("total %u files added, compressed %u -> %u bytes\n", total, totalact, totalcmp);
fclose(out);
}