author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (unidiff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/PPMd.h | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/PPMd.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/PPMd.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/PPMd.h b/noncore/apps/opie-reader/PPMd.h new file mode 100644 index 0000000..43d9ab4 --- a/dev/null +++ b/noncore/apps/opie-reader/PPMd.h | |||
@@ -0,0 +1,53 @@ | |||
1 | #include "CSource.h" | ||
2 | /**************************************************************************** | ||
3 | * This file is part of PPMd project * | ||
4 | * Written and distributed to public domain by Dmitry Shkarin 1997, * | ||
5 | * 1999-2001 * | ||
6 | * Contents: interface to encoding/decoding routines * | ||
7 | * Comments: this file can be used as an interface to PPMd module * | ||
8 | * (consisting of Model.cpp) from external program * | ||
9 | ****************************************************************************/ | ||
10 | #if !defined(_PPMD_H_) | ||
11 | #define _PPMD_H_ | ||
12 | |||
13 | #include "PPMdType.h" | ||
14 | |||
15 | #ifdef __cplusplus | ||
16 | extern "C" { | ||
17 | #endif | ||
18 | |||
19 | BOOL _STDCALL StartSubAllocator(UINT SubAllocatorSize); | ||
20 | void _STDCALL StopSubAllocator(); /* it can be called once */ | ||
21 | DWORD _STDCALL GetUsedMemory(); /* for information only */ | ||
22 | |||
23 | /**************************************************************************** | ||
24 | * Method of model restoration at memory insufficiency: * | ||
25 | * MRM_RESTART - restart model from scratch (default) * | ||
26 | * MRM_CUT_OFF - cut off model (nearly twice slower) * | ||
27 | * MRM_FREEZE - freeze context tree (dangerous) */ | ||
28 | enum MR_METHOD { MRM_RESTART, MRM_CUT_OFF, MRM_FREEZE }; | ||
29 | |||
30 | /**************************************************************************** | ||
31 | * (MaxOrder == 1) parameter value has special meaning, it does not restart * | ||
32 | * model and can be used for solid mode archives; * | ||
33 | * Call sequence: * | ||
34 | * StartSubAllocator(SubAllocatorSize); * | ||
35 | * EncodeFile(SolidArcFile,File1,MaxOrder,MRM_RESTART); * | ||
36 | * EncodeFile(SolidArcFile,File2, 1,MRM_RESTART); * | ||
37 | * ... * | ||
38 | * EncodeFile(SolidArcFile,FileN, 1,MRM_RESTART); * | ||
39 | * StopSubAllocator(); * | ||
40 | ****************************************************************************/ | ||
41 | void _STDCALL EncodeFile(CSink* EncodedFile,CSource* DecodedFile, | ||
42 | int MaxOrder,MR_METHOD MRMethod=MRM_RESTART); | ||
43 | void _STDCALL DecodeFile(CSink* DecodedFile,CSource* EncodedFile, | ||
44 | int MaxOrder,MR_METHOD MRMethod=MRM_RESTART); | ||
45 | |||
46 | /* imported function */ | ||
47 | void _STDCALL PrintInfo(CInfo* DecodedFile, CInfo* EncodedFile); | ||
48 | |||
49 | #ifdef __cplusplus | ||
50 | } | ||
51 | #endif | ||
52 | |||
53 | #endif /* !defined(_PPMD_H_) */ | ||