2006-10-28 19:45:02 +00:00
|
|
|
/*
|
|
|
|
* compressor.h
|
|
|
|
*
|
|
|
|
* This file is a part of NSIS.
|
|
|
|
*
|
2009-02-01 14:44:30 +00:00
|
|
|
* Copyright (C) 1999-2009 Nullsoft and Contributors
|
2006-10-28 19:45:02 +00:00
|
|
|
*
|
|
|
|
* Licensed under the zlib/libpng license (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
*
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* This software is provided 'as-is', without any express or implied
|
|
|
|
* warranty.
|
2010-03-24 17:22:56 +00:00
|
|
|
*
|
|
|
|
* Unicode support by Jim Park -- 08/24/2007
|
2006-10-28 19:45:02 +00:00
|
|
|
*/
|
|
|
|
|
2002-08-02 10:01:35 +00:00
|
|
|
#ifndef __COMPRESSOR_H__
|
|
|
|
#define __COMPRESSOR_H__
|
|
|
|
|
2010-03-24 17:22:56 +00:00
|
|
|
#include "tchar.h"
|
|
|
|
|
2002-08-02 10:01:35 +00:00
|
|
|
#define C_OK 0
|
2007-01-22 20:01:24 +00:00
|
|
|
#define C_FINISHED 1
|
|
|
|
|
2004-10-10 20:58:33 +00:00
|
|
|
#define C_FINISH true
|
2002-08-02 10:01:35 +00:00
|
|
|
|
|
|
|
class ICompressor {
|
|
|
|
public:
|
2006-04-28 13:23:29 +00:00
|
|
|
virtual ~ICompressor() {}
|
|
|
|
|
2004-10-11 14:26:13 +00:00
|
|
|
virtual int Init(int level, unsigned int dict_size) = 0;
|
2002-08-02 10:01:35 +00:00
|
|
|
virtual int End() = 0;
|
2004-10-10 20:58:33 +00:00
|
|
|
virtual int Compress(bool finish) = 0;
|
2002-08-02 10:01:35 +00:00
|
|
|
|
|
|
|
virtual void SetNextIn(char *in, unsigned int size) = 0;
|
|
|
|
virtual void SetNextOut(char *out, unsigned int size) = 0;
|
|
|
|
|
|
|
|
virtual char* GetNextOut() = 0;
|
|
|
|
|
|
|
|
virtual unsigned int GetAvailIn() = 0;
|
|
|
|
virtual unsigned int GetAvailOut() = 0;
|
2003-02-07 23:04:25 +00:00
|
|
|
|
2010-03-24 17:22:56 +00:00
|
|
|
virtual const TCHAR* GetName() = 0;
|
2004-05-08 17:40:29 +00:00
|
|
|
|
2010-03-24 17:22:56 +00:00
|
|
|
virtual const TCHAR* GetErrStr(int err) = 0;
|
2002-08-02 10:01:35 +00:00
|
|
|
};
|
|
|
|
|
2004-03-12 20:43:54 +00:00
|
|
|
#endif
|