summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/PPMd.h
authorpohly <pohly>2004-08-24 20:52:45 (UTC)
committer pohly <pohly>2004-08-24 20:52:45 (UTC)
commit73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff)
tree1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/PPMd.h
parente90847c784c48bd21bf8768cb38edb853b832697 (diff)
downloadopie-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) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/PPMd.h53
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 @@
+#include "CSource.h"
+/****************************************************************************
+ * This file is part of PPMd project *
+ * Written and distributed to public domain by Dmitry Shkarin 1997, *
+ * 1999-2001 *
+ * Contents: interface to encoding/decoding routines *
+ * Comments: this file can be used as an interface to PPMd module *
+ * (consisting of Model.cpp) from external program *
+ ****************************************************************************/
+#if !defined(_PPMD_H_)
+#define _PPMD_H_
+
+#include "PPMdType.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+BOOL _STDCALL StartSubAllocator(UINT SubAllocatorSize);
+void _STDCALL StopSubAllocator(); /* it can be called once */
+DWORD _STDCALL GetUsedMemory(); /* for information only */
+
+/****************************************************************************
+ * Method of model restoration at memory insufficiency: *
+ * MRM_RESTART - restart model from scratch (default) *
+ * MRM_CUT_OFF - cut off model (nearly twice slower) *
+ * MRM_FREEZE - freeze context tree (dangerous) */
+enum MR_METHOD { MRM_RESTART, MRM_CUT_OFF, MRM_FREEZE };
+
+/****************************************************************************
+ * (MaxOrder == 1) parameter value has special meaning, it does not restart *
+ * model and can be used for solid mode archives; *
+ * Call sequence: *
+ * StartSubAllocator(SubAllocatorSize); *
+ * EncodeFile(SolidArcFile,File1,MaxOrder,MRM_RESTART); *
+ * EncodeFile(SolidArcFile,File2, 1,MRM_RESTART); *
+ * ... *
+ * EncodeFile(SolidArcFile,FileN, 1,MRM_RESTART); *
+ * StopSubAllocator(); *
+ ****************************************************************************/
+void _STDCALL EncodeFile(CSink* EncodedFile,CSource* DecodedFile,
+ int MaxOrder,MR_METHOD MRMethod=MRM_RESTART);
+void _STDCALL DecodeFile(CSink* DecodedFile,CSource* EncodedFile,
+ int MaxOrder,MR_METHOD MRMethod=MRM_RESTART);
+
+/* imported function */
+void _STDCALL PrintInfo(CInfo* DecodedFile, CInfo* EncodedFile);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(_PPMD_H_) */