From 8713b3a0033fb3bd6bc2cbc2c828ec516bdfd466 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Wed, 1 Feb 2023 12:35:36 -0800 Subject: [PATCH] One bug down --- tile.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tile.cpp b/tile.cpp index d246788a..4560fd9e 100644 --- a/tile.cpp +++ b/tile.cpp @@ -79,9 +79,6 @@ struct decompressor { fprintf(stderr, "initialize decompression: %d %s\n", d, zs.msg); exit(EXIT_IMPOSSIBLE); } - - zs.avail_in = 0; - zs.avail_out = 0; } int fread(void *p, size_t size, size_t nmemb, std::atomic *geompos) { @@ -104,6 +101,10 @@ struct decompressor { } printf("to read %d, to write %d, %s\n", zs.avail_in, zs.avail_out, within ? "within": "not"); + for (size_t i = 0; i < 50 && i < zs.avail_in; i++) { + printf("%d ", zs.next_in[i]); + } + printf("\n"); size_t avail_before = zs.avail_in; @@ -2228,6 +2229,8 @@ long long write_tile(decompressor *geoms, std::atomic *geompos_in, ch if (*geompos_in != og) { if (z != 0) { + long long n = *geompos_in; + printf("-------- seek: end %lld to %lld\n", n, og); geoms->end(geompos_in); geoms->begin(); }