Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PPMd.h

Go to the documentation of this file.
00001 #include "CSource.h"
00002 /****************************************************************************
00003  *  This file is part of PPMd project                                       *
00004  *  Written and distributed to public domain by Dmitry Shkarin 1997,        *
00005  *  1999-2001                                                               *
00006  *  Contents: interface to encoding/decoding routines                       *
00007  *  Comments: this file can be used as an interface to PPMd module          *
00008  *  (consisting of Model.cpp) from external program                                     *
00009  ****************************************************************************/
00010 #if !defined(_PPMD_H_)
00011 #define _PPMD_H_
00012 
00013 #include "PPMdType.h"
00014 
00015 #ifdef  __cplusplus
00016 extern "C" {
00017 #endif
00018 
00019 BOOL  _STDCALL StartSubAllocator(UINT SubAllocatorSize);
00020 void  _STDCALL StopSubAllocator();          /* it can be called once        */
00021 DWORD _STDCALL GetUsedMemory();             /* for information only         */
00022 
00023 /****************************************************************************
00024  * Method of model restoration at memory insufficiency:                     *
00025  *     MRM_RESTART - restart model from scratch (default)                   *
00026  *     MRM_CUT_OFF - cut off model (nearly twice slower)                    *
00027  *     MRM_FREEZE  - freeze context tree (dangerous)                        */
00028 enum MR_METHOD { MRM_RESTART, MRM_CUT_OFF, MRM_FREEZE };
00029 
00030 /****************************************************************************
00031  * (MaxOrder == 1) parameter value has special meaning, it does not restart *
00032  * model and can be used for solid mode archives;                           *
00033  * Call sequence:                                                           *
00034  *     StartSubAllocator(SubAllocatorSize);                                 *
00035  *     EncodeFile(SolidArcFile,File1,MaxOrder,MRM_RESTART);                 *
00036  *     EncodeFile(SolidArcFile,File2,       1,MRM_RESTART);                 *
00037  *     ...                                                                  *
00038  *     EncodeFile(SolidArcFile,FileN,       1,MRM_RESTART);                 *
00039  *     StopSubAllocator();                                                  *
00040  ****************************************************************************/
00041 void _STDCALL EncodeFile(CSink* EncodedFile,CSource* DecodedFile,
00042                         int MaxOrder,MR_METHOD MRMethod=MRM_RESTART);
00043 void _STDCALL DecodeFile(CSink* DecodedFile,CSource* EncodedFile,
00044                         int MaxOrder,MR_METHOD MRMethod=MRM_RESTART);
00045 
00046 /*  imported function                                                       */
00047 void _STDCALL  PrintInfo(CInfo* DecodedFile, CInfo* EncodedFile);
00048 
00049 #ifdef  __cplusplus
00050 }
00051 #endif
00052 
00053 #endif /* !defined(_PPMD_H_) */

Generated on Sat Nov 5 16:16:56 2005 for OPIE by  doxygen 1.4.2