Compile fixes for CZipOutputStream, link deflate code

This commit is contained in:
Phillip Stephens 2022-12-05 21:41:21 -08:00
parent 529c359935
commit f163fb3fd5
6 changed files with 11 additions and 5 deletions

View File

@ -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,

View File

@ -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],
],
},

View File

@ -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;

View File

@ -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;

View File

@ -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 ";

View File

@ -33,7 +33,7 @@
/* #define GEN_TREES_H */
#include "deflate.h"
#include "zlib/deflate.h"
#ifdef DEBUG
# include <ctype.h>
@ -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 {