Debian Codegraph @

Source/compressor.h

raw
1 /*
2 * compressor.h
3 *
4 * This file is a part of NSIS.
5 *
6 * Copyright (C) 1999-2026 Nullsoft and Contributors
7 *
8 * Licensed under the zlib/libpng license (the "License");
9 * you may not use this file except in compliance with the License.
10 *
11 * Licence details can be found in the file COPYING.
12 *
13 * This software is provided 'as-is', without any express or implied
14 * warranty.
15 *
16 * Unicode support by Jim Park -- 08/24/2007
17 */
18
19 #ifndef __COMPRESSOR_H__
20 #define __COMPRESSOR_H__
21
22 #include "tchar.h"
23
24 #define C_OK 0
25 #define C_FINISHED 1
26
27 #define C_FINISH true
28
29 class ICompressor {
30 public:
31 virtual ~ICompressor() {}
32
33 virtual int Init(int level, unsigned int dict_size) = 0;
34 virtual int End() = 0;
35 virtual int Compress(bool finish) = 0;
36
37 virtual void SetNextIn(char *in, unsigned int size) = 0;
38 virtual void SetNextOut(char *out, unsigned int size) = 0;
39
40 virtual char* GetNextOut() = 0;
41
42 virtual unsigned int GetAvailIn() = 0;
43 virtual unsigned int GetAvailOut() = 0;
44
45 virtual const TCHAR* GetName() = 0;
46
47 virtual const TCHAR* GetErrStr(int err) = 0;
48 };
49
50 #endif