forked from Spore-Community/Spore-ModAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStreamDefinitions.cpp
More file actions
496 lines (393 loc) · 19.6 KB
/
Copy pathStreamDefinitions.cpp
File metadata and controls
496 lines (393 loc) · 19.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
/****************************************************************************
* Copyright (C) 2018 Eric Mor
*
* This file is part of Spore ModAPI.
*
* Spore ModAPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include <Spore\IO\FileStream.h>
#include <Spore\IO\StreamAdapter.h>
#include <Spore\IO\StreamBuffer.h>
#include <Spore\IO\StreamChild.h>
#include <Spore\IO\StreamFixedMemory.h>
#include <Spore\IO\StreamMemory.h>
#include <Spore\IO\StreamNull.h>
#include <Spore\IO\StreamCompressionZLib.h>
namespace IO
{
/////////////////////////
//// StreamAdapter.h ////
/////////////////////////
auto_STATIC_METHOD(IO, bool, ReadBool8, Args(IStream* pIS, bool& value), Args(pIS, value));
auto_STATIC_METHOD(IO, bool, ReadInt8, Args(IStream* pIS, int8_t* value, size_type count), Args(pIS, value, count));
auto_STATIC_METHOD(IO, bool, ReadUInt8, Args(IStream* pIS, uint8_t* value, size_type count), Args(pIS, value, count));
auto_STATIC_METHOD(IO, bool, ReadInt16, Args(IStream* pIS, int16_t* value, size_type count, Endian endianSource), Args(pIS, value, count, endianSource));
auto_STATIC_METHOD(IO, bool, ReadUInt16, Args(IStream* pIS, uint16_t* value, size_type count, Endian endianSource), Args(pIS, value, count, endianSource));
auto_STATIC_METHOD(IO, bool, ReadInt32, Args(IStream* pIS, int32_t* value, size_type count, Endian endianSource), Args(pIS, value, count, endianSource));
auto_STATIC_METHOD(IO, bool, ReadUInt32, Args(IStream* pIS, uint32_t* value, size_type count, Endian endianSource), Args(pIS, value, count, endianSource));
auto_STATIC_METHOD(IO, bool, ReadFloat, Args(IStream* pIS, float* value, size_type count, Endian endianSource), Args(pIS, value, count, endianSource));
auto_STATIC_METHOD(IO, bool, ReadResourceID, Args(IStream* pIS, ResourceID* value, size_type count, Endian endianSource), Args(pIS, value, count, endianSource));
auto_STATIC_METHOD(IO, IStream*, ReadCString, Args(IStream* pIS, eastl::string8& str), Args(pIS, str));
auto_STATIC_METHOD(IO, size_type, ReadLine, Args(IStream* pIS, char* pLine, size_type nLineCapacity), Args(pIS, pLine, nLineCapacity));
auto_STATIC_METHOD(IO, bool, WriteInt8, Args(IStream* pOS, const int8_t* value, size_type count), Args(pOS, value, count));
auto_STATIC_METHOD(IO, bool, WriteUInt8, Args(IStream* pOS, const uint8_t* value, size_type count), Args(pOS, value, count));
auto_STATIC_METHOD(IO, bool, WriteInt16, Args(IStream* pOS, const int16_t* value, size_type count, Endian endianDestination), Args(pOS, value, count, endianDestination));
auto_STATIC_METHOD(IO, bool, WriteUInt16, Args(IStream* pOS, const uint16_t* value, size_type count, Endian endianDestination), Args(pOS, value, count, endianDestination));
auto_STATIC_METHOD(IO, bool, WriteInt32, Args(IStream* pOS, const int32_t* value, size_type count, Endian endianDestination), Args(pOS, value, count, endianDestination));
auto_STATIC_METHOD(IO, bool, WriteUInt32, Args(IStream* pOS, const uint32_t* value, size_type count, Endian endianDestination), Args(pOS, value, count, endianDestination));
auto_STATIC_METHOD(IO, bool, WriteFloat, Args(IStream* pOS, const float* value, size_type count, Endian endianDestination), Args(pOS, value, count, endianDestination));
auto_STATIC_METHOD(IO, bool, WriteResourceID, Args(IStream* pOS, const ResourceID* value, size_type count, Endian endianDestination), Args(pOS, value, count, endianDestination));
auto_STATIC_METHOD(IO, bool, WriteLine, Args(IStream* pOS, const char8_t* pLineSource, size_type nLineLength, LineEnd lineEndToUse), Args(pOS, pLineSource, nLineLength, lineEndToUse));
/////////////////////////
}
namespace IO
{
//////////////////////
//// FileStream.h ////
//////////////////////
FileStream::FileStream(const char* pPath8)
: mhFile(reinterpret_cast<void*>(-1)),
mnRefCount(0),
mnAccessFlags(AccessFlags::None),
mnCD((CD)0),
mnSharing(0),
mnUsageHints(kUsageHintNone),
mnLastError(0),
mnSize(static_cast<size_type>(-1))
{
mpPath16[0] = 0;
FileStream::SetPathCString(pPath8); // Note that in a constructor, the virtual function mechanism is inoperable.
}
FileStream::FileStream(const char16_t* pPath16)
: mhFile(reinterpret_cast<void*>(-1)),
mnRefCount(0),
mnAccessFlags(AccessFlags::None),
mnCD((CD)0),
mnSharing(0),
mnUsageHints(kUsageHintNone),
mnLastError(0),
mnSize(static_cast<size_type>(-1))
{
mpPath16[0] = 0;
FileStream::SetPath(pPath16); // Note that in a constructor, the virtual function mechanism is inoperable.
}
FileStream::~FileStream()
{
FileStream::Close(); // Note that in a destructor, the virtual function mechanism is inoperable.
}
auto_METHOD_(FileStream, int, AddRef);
auto_METHOD_(FileStream, int, Release);
auto_METHOD_const_(FileStream, uint32_t, GetType);
auto_METHOD_const_(FileStream, AccessFlags, GetAccessFlags);
auto_METHOD_const_(FileStream, FileError, GetState);
auto_METHOD_(FileStream, bool, Close);
auto_METHOD_const_(FileStream, size_type, GetSize);
auto_METHOD(FileStream, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(FileStream, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(FileStream, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(FileStream, int, GetAvailable);
auto_METHOD(FileStream, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(FileStream, bool, Flush);
auto_METHOD(FileStream, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_VOID(FileStream, SetPath, Args(const char16_t* pPath16), Args(pPath16));
auto_METHOD_VOID(FileStream, SetPathCString, Args(const char* pPath8), Args(pPath8));
auto_METHOD(FileStream, size_t, GetPath, Args(char16_t* pPath16, size_t nPathLength), Args(pPath16, nPathLength));
auto_METHOD(FileStream, size_t, GetPathCString, Args(char* pPath8, size_t nPathLength), Args(pPath8, nPathLength));
auto_METHOD(FileStream, bool, Open, Args(AccessFlags nAccessFlags, CD nCreationDisposition, int nSharing, int nUsageHints), Args(nAccessFlags, nCreationDisposition, nSharing, nUsageHints));
#ifndef MODAPI_DLL_EXPORT
//////////////////////
////////////////////////
//// StreamBuffer.h ////
////////////////////////
auto_METHOD(StreamBuffer, bool, SetBufferSizes, Args(size_type nReadBufferSize, size_type nWriteBufferSize), Args(nReadBufferSize, nWriteBufferSize));
auto_METHOD(StreamBuffer, bool, SetStream, Args(IStream* pStream), Args(pStream));
auto_METHOD(StreamBuffer, bool, FillWriteBuffer, Args(const char* pData, size_type nSize), Args(pData, nSize));
auto_METHOD_(StreamBuffer, bool, FlushWriteBuffer);
auto_METHOD_(StreamBuffer, int, AddRef);
auto_METHOD_(StreamBuffer, int, Release);
auto_METHOD_const_(StreamBuffer, uint32_t, GetType);
auto_METHOD_const_(StreamBuffer, AccessFlags, GetAccessFlags);
auto_METHOD_const_(StreamBuffer, FileError, GetState);
auto_METHOD_(StreamBuffer, bool, Close);
auto_METHOD_const_(StreamBuffer, size_type, GetSize);
auto_METHOD(StreamBuffer, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(StreamBuffer, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(StreamBuffer, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(StreamBuffer, int, GetAvailable);
auto_METHOD(StreamBuffer, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(StreamBuffer, bool, Flush);
auto_METHOD(StreamBuffer, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
StreamBuffer::StreamBuffer(size_type nReadBufferSize, size_type nWriteBufferSize, IStream* pStream)
: mpStream(NULL),
mnRefCount(0),
mnPositionExternal(0),
mnPositionInternal(0),
mpReadBuffer(NULL),
mnReadBufferSize(0),
mnReadBufferStartPosition(0),
mnReadBufferUsed(0),
mpWriteBuffer(NULL),
mnWriteBufferSize(0),
mnWriteBufferStartPosition(0),
mnWriteBufferUsed(0)
{
SetBufferSizes(nReadBufferSize, nWriteBufferSize);
SetStream(pStream);
}
StreamBuffer::~StreamBuffer()
{
SetStream(NULL); // This will flush the write buffer.
if (mpReadBuffer)
{
IO::GetAllocator()->Free(mpReadBuffer);
mpReadBuffer = nullptr;
}
if (mpWriteBuffer)
{
IO::GetAllocator()->Free(mpWriteBuffer);
mpWriteBuffer = nullptr;
}
}
void StreamBuffer::GetBufferSizes(size_type& nReadBufferSize, size_type& nWriteBufferSize) const
{
nReadBufferSize = mnReadBufferSize;
nWriteBufferSize = mnWriteBufferSize;
}
////////////////////////
///////////////////////
//// StreamChild.h ////
///////////////////////
StreamChild::StreamChild(IStream* pStreamParent, size_type nPosition, size_type nSize) :
mnRefCount(0),
mnAccessFlags(AccessFlags::None),
mpStreamParent(0),
mnPositionParent(0),
mnPosition(0),
mnSize(0)
{
if (pStreamParent) {
Open(pStreamParent, nPosition, nSize);
}
}
auto_METHOD(StreamChild, bool, Open, Args(IStream* pStreamParent, size_type nPosition, size_type nSize), Args(pStreamParent, nPosition, nSize));
auto_METHOD_(StreamChild, int, AddRef);
auto_METHOD_(StreamChild, int, Release);
auto_METHOD_const_(StreamChild, uint32_t, GetType);
auto_METHOD_const_(StreamChild, AccessFlags, GetAccessFlags);
auto_METHOD_const_(StreamChild, FileError, GetState);
auto_METHOD_(StreamChild, bool, Close);
auto_METHOD_const_(StreamChild, size_type, GetSize);
auto_METHOD(StreamChild, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(StreamChild, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(StreamChild, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(StreamChild, int, GetAvailable);
auto_METHOD(StreamChild, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(StreamChild, bool, Flush);
auto_METHOD(StreamChild, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
///////////////////////
/////////////////////////////
//// StreamFixedMemory.h ////
/////////////////////////////
auto_METHOD(FixedMemoryStream, bool, SetData, Args(void* pData, size_type nSize), Args(pData, nSize));
auto_METHOD_(FixedMemoryStream, int, AddRef);
auto_METHOD_(FixedMemoryStream, int, Release);
auto_METHOD_const_(FixedMemoryStream, uint32_t, GetType);
auto_METHOD_const_(FixedMemoryStream, AccessFlags, GetAccessFlags);
auto_METHOD_const_(FixedMemoryStream, FileError, GetState);
auto_METHOD_(FixedMemoryStream, bool, Close);
auto_METHOD_const_(FixedMemoryStream, size_type, GetSize);
auto_METHOD(FixedMemoryStream, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(FixedMemoryStream, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(FixedMemoryStream, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(FixedMemoryStream, int, GetAvailable);
auto_METHOD(FixedMemoryStream, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(FixedMemoryStream, bool, Flush);
auto_METHOD(FixedMemoryStream, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
FixedMemoryStream::FixedMemoryStream(void* pData, size_type nSize)
: mpData(pData)
, mnRefCount(0)
, mnSize(nSize)
, mnCapacity(nSize)
, mnPosition(0)
{
}
/////////////////////////////
////////////////////////
//// StreamMemory.h ////
////////////////////////
SharedPointer::~SharedPointer()
{
if (mbFreeData)
mpAllocator->Free(mpData);
}
MemoryStream::MemoryStream(const char* pName) :
mpSharedPointer(NULL),
mnRefCount(0),
mnSize(0),
mnCapacity(0),
mnPosition(0),
//mbClearNewMemory(false),
mbResizeEnabled(false),
mfResizeFactor(1.5f),
mnResizeIncrement(0)
{
}
MemoryStream::MemoryStream(SharedPointer* pSharedPointer, size_type nSize, const char* pName)
: mpSharedPointer(NULL),
mnRefCount(0),
mnSize(0),
mnCapacity(0),
mnPosition(0),
//mbClearNewMemory(false),
mbResizeEnabled(false),
mfResizeFactor(1.5f),
mnResizeIncrement(0)
{
if (pSharedPointer && nSize)
SetData(pSharedPointer, nSize);
}
MemoryStream::MemoryStream(void* pData, size_type nSize, bool bUsePointer, bool bFreePointer, Allocator *pAllocator, const char* pName)
: mpSharedPointer(NULL),
mnRefCount(0),
mnSize(0),
mnCapacity(0),
mnPosition(0),
//mbClearNewMemory(false),
mbResizeEnabled(false),
mfResizeFactor(1.5f),
mnResizeIncrement(0)
{
if (pData || nSize)
SetDataRaw(pData, nSize, bUsePointer, bFreePointer, pAllocator);
}
MemoryStream::~MemoryStream()
{
if (mpSharedPointer) mpSharedPointer->Release();
}
auto_METHOD_(MemoryStream, int, AddRef);
auto_METHOD_(MemoryStream, int, Release);
auto_METHOD_const_(MemoryStream, uint32_t, GetType);
auto_METHOD_const_(MemoryStream, AccessFlags, GetAccessFlags);
auto_METHOD_const_(MemoryStream, FileError, GetState);
auto_METHOD_(MemoryStream, bool, Close);
auto_METHOD_const_(MemoryStream, size_type, GetSize);
auto_METHOD(MemoryStream, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(MemoryStream, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(MemoryStream, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(MemoryStream, int, GetAvailable);
auto_METHOD(MemoryStream, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(MemoryStream, bool, Flush);
auto_METHOD(MemoryStream, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD(MemoryStream, bool, SetData, Args(SharedPointer* pSharedPointer, size_type nSize), Args(pSharedPointer, nSize));
auto_METHOD(MemoryStream, bool, SetDataRaw, Args(void* pData, size_type nSize, bool bUsePointer, bool bFreePointer, Allocator *pAllocator), Args(pData, nSize, bUsePointer, bFreePointer, pAllocator));
auto_METHOD_const(MemoryStream, float, GetOption, Args(Options option), Args(option));
auto_METHOD_VOID(MemoryStream, SetOption, Args(Options option, float fValue), Args(option, fValue));
////////////////////////
//////////////////////
//// StreamNull.h ////
//////////////////////
StreamNull::StreamNull()
: mnRefCount(0)
{}
auto_METHOD_(StreamNull, int, AddRef);
auto_METHOD_(StreamNull, int, Release);
auto_METHOD_const_(StreamNull, uint32_t, GetType);
auto_METHOD_const_(StreamNull, AccessFlags, GetAccessFlags);
auto_METHOD_const_(StreamNull, FileError, GetState);
auto_METHOD_(StreamNull, bool, Close);
auto_METHOD_const_(StreamNull, size_type, GetSize);
auto_METHOD(StreamNull, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(StreamNull, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(StreamNull, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(StreamNull, int, GetAvailable);
auto_METHOD(StreamNull, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(StreamNull, bool, Flush);
auto_METHOD(StreamNull, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
//////////////////////
/////////////////////////////////
//// StreamCompressionZLib.h ////
/////////////////////////////////
StreamCompressionZLib::StreamCompressionZLib(IStream* pOutputStream, int nHint)
: mpOutputStream(NULL),
mbOpen(false),
mbInited(false),
mpZLibStream(NULL),
mFormat(kCompressedFormatZLib),
mHint(nHint),
mpOutputBuffer(NULL),
mnOutputBufferSize(0x2000)
{
if (pOutputStream)
StreamCompressionZLib::Open(pOutputStream, nHint);
}
StreamCompressionZLib::~StreamCompressionZLib()
{
Dispose();
}
auto_METHOD_(StreamCompressionZLib, int, AddRef);
auto_METHOD_(StreamCompressionZLib, int, Release);
auto_METHOD_const_(StreamCompressionZLib, uint32_t, GetType);
auto_METHOD_const_(StreamCompressionZLib, AccessFlags, GetAccessFlags);
auto_METHOD_const_(StreamCompressionZLib, FileError, GetState);
auto_METHOD_(StreamCompressionZLib, bool, Close);
auto_METHOD_const_(StreamCompressionZLib, size_type, GetSize);
auto_METHOD(StreamCompressionZLib, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(StreamCompressionZLib, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(StreamCompressionZLib, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(StreamCompressionZLib, int, GetAvailable);
auto_METHOD(StreamCompressionZLib, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(StreamCompressionZLib, bool, Flush);
auto_METHOD(StreamCompressionZLib, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD(StreamCompressionZLib, bool, SetCompressedFormat, Args(CompressedFormat format), Args(format));
auto_METHOD(StreamCompressionZLib, bool, SetBufferSize, Args(size_t nOutputBufferSize), Args(nOutputBufferSize));
auto_METHOD(StreamCompressionZLib, bool, SetCompressionHint, Args(int hint), Args(hint));
auto_METHOD(StreamCompressionZLib, bool, Open, Args(IStream* pOutputStream, int nHint), Args(pOutputStream, nHint));
// destructor, private for ModAPI
auto_METHOD_VOID_(StreamCompressionZLib, Dispose);
StreamDecompressionZLib::StreamDecompressionZLib(IStream* pInputStream)
: mpInputStream(NULL),
mFormat(kCompressedFormatZLib),
mbOpen(false),
mbEOF(false),
mbInited(false),
mpZLibStream(NULL),
mpInputBuffer(NULL),
mnInputBufferSize(0x2000)
{}
StreamDecompressionZLib::~StreamDecompressionZLib()
{
Dispose();
}
auto_METHOD_(StreamDecompressionZLib, int, AddRef);
auto_METHOD_(StreamDecompressionZLib, int, Release);
auto_METHOD_const_(StreamDecompressionZLib, uint32_t, GetType);
auto_METHOD_const_(StreamDecompressionZLib, AccessFlags, GetAccessFlags);
auto_METHOD_const_(StreamDecompressionZLib, FileError, GetState);
auto_METHOD_(StreamDecompressionZLib, bool, Close);
auto_METHOD_const_(StreamDecompressionZLib, size_type, GetSize);
auto_METHOD(StreamDecompressionZLib, bool, SetSize, Args(size_type size), Args(size));
auto_METHOD_const(StreamDecompressionZLib, int, GetPosition, Args(PositionType positionType), Args(positionType));
auto_METHOD(StreamDecompressionZLib, bool, SetPosition, Args(int distance, PositionType positionType), Args(distance, positionType));
auto_METHOD_const_(StreamDecompressionZLib, int, GetAvailable);
auto_METHOD(StreamDecompressionZLib, int, Read, Args(void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD_(StreamDecompressionZLib, bool, Flush);
auto_METHOD(StreamDecompressionZLib, int, Write, Args(const void* pData, size_t nSize), Args(pData, nSize));
auto_METHOD(StreamDecompressionZLib, bool, SetCompressedFormat, Args(CompressedFormat format), Args(format));
auto_METHOD(StreamDecompressionZLib, bool, SetBufferSize, Args(size_t nInputBufferSize), Args(nInputBufferSize));
auto_METHOD(StreamDecompressionZLib, bool, Open, Args(IStream* pInputStream), Args(pInputStream));
// destructor, private for ModAPI
auto_METHOD_VOID_(StreamDecompressionZLib, Dispose);
/////////////////////////////////
#endif
}