diff --git a/.vscode/settings.json b/.vscode/settings.json index 5eb340d5..ed5ab366 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,7 +41,8 @@ "oscache.h": "c", "stdlib.h": "c", "musyx_priv.h": "c", - "gxenum.h": "c" + "gxenum.h": "c", + "trees.h": "c" }, "files.autoSave": "onFocusChange", "files.insertFinalNewline": true, diff --git a/configure.py b/configure.py index 078912ac..a210f6ef 100755 --- a/configure.py +++ b/configure.py @@ -624,12 +624,14 @@ LIBS = [ "host": True, "objects": [ ["Kyoto/zlib/adler32", True], + ["Kyoto/zlib/deflate", True], ["Kyoto/zlib/infblock", True], ["Kyoto/zlib/infcodes", True], ["Kyoto/zlib/inffast", True], ["Kyoto/zlib/inflate", True], ["Kyoto/zlib/inftrees", True], ["Kyoto/zlib/infutil", True], + ["Kyoto/zlib/trees", True], ["Kyoto/zlib/zutil", True], ], }, diff --git a/include/Kyoto/Streams/CZipOutputStream.hpp b/include/Kyoto/Streams/CZipOutputStream.hpp index 3a652ebd..42b15c6d 100644 --- a/include/Kyoto/Streams/CZipOutputStream.hpp +++ b/include/Kyoto/Streams/CZipOutputStream.hpp @@ -16,6 +16,8 @@ public: void Finish(); bool Process(bool v); void Write(const void* ptr, size_t len); + + int GetCompressedBytesWritten() { return mCompressedBytesWritten; } private: COutputStream* mOutput; int mCompressedBytesWritten; diff --git a/src/Kyoto/Streams/CZipOutputStream.cpp b/src/Kyoto/Streams/CZipOutputStream.cpp index bc033b07..b89f1825 100644 --- a/src/Kyoto/Streams/CZipOutputStream.cpp +++ b/src/Kyoto/Streams/CZipOutputStream.cpp @@ -3,6 +3,7 @@ #include "rstl/math.hpp" #include "Kyoto/Streams/CZipSupport.hpp" +#include "Kyoto/Alloc/CMemory.hpp" CZipOutputStream::CZipOutputStream(COutputStream* out, int level) : COutputStream(1024) @@ -13,7 +14,7 @@ CZipOutputStream::CZipOutputStream(COutputStream* out, int level) mZStream->zalloc = CZipSupport::Alloc; mZStream->zfree = CZipSupport::Free; mZStream->opaque = nullptr; - + int useLevel = 9; if (level < 10) { useLevel = level; diff --git a/src/Kyoto/zlib/deflate.c b/src/Kyoto/zlib/deflate.c index 25d5818e..bfd27d70 100644 --- a/src/Kyoto/zlib/deflate.c +++ b/src/Kyoto/zlib/deflate.c @@ -49,7 +49,7 @@ /* @(#) $Id$ */ -#include "deflate.h" +#include "zlib/deflate.h" const char deflate_copyright[] = " deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly "; diff --git a/src/Kyoto/zlib/trees.c b/src/Kyoto/zlib/trees.c index f01fb30d..4f4fde07 100644 --- a/src/Kyoto/zlib/trees.c +++ b/src/Kyoto/zlib/trees.c @@ -33,7 +33,7 @@ /* #define GEN_TREES_H */ -#include "deflate.h" +#include "zlib/deflate.h" #ifdef DEBUG # include @@ -115,7 +115,7 @@ local int base_dist[D_CODES]; /* First normalized distance for each code (0 = distance of 1) */ #else -# include "trees.h" +# include "zlib/trees.h" #endif /* GEN_TREES_H */ struct static_tree_desc_s {