\r
typedef UInt32 CLzRef;\r
\r
-typedef struct _CMatchFinder\r
-{\r
- Byte *buffer;\r
- UInt32 pos;\r
- UInt32 posLimit;\r
- UInt32 streamPos;\r
- UInt32 lenLimit;\r
-\r
- UInt32 cyclicBufferPos;\r
- UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */\r
-\r
- Byte streamEndWasReached;\r
- Byte btMode;\r
- Byte bigHash;\r
- Byte directInput;\r
-\r
- UInt32 matchMaxLen;\r
- CLzRef *hash;\r
- CLzRef *son;\r
- UInt32 hashMask;\r
- UInt32 cutValue;\r
-\r
- Byte *bufferBase;\r
- ISeqInStream *stream;\r
-\r
- UInt32 blockSize;\r
- UInt32 keepSizeBefore;\r
- UInt32 keepSizeAfter;\r
-\r
- UInt32 numHashBytes;\r
- size_t directInputRem;\r
- UInt32 historySize;\r
- UInt32 fixedHashSize;\r
- UInt32 hashSizeSum;\r
- SRes result;\r
- UInt32 crc[256];\r
- size_t numRefs;\r
-\r
- UInt64 expectedDataSize;\r
+typedef struct _CMatchFinder {\r
+ Byte *buffer;\r
+ UInt32 pos;\r
+ UInt32 posLimit;\r
+ UInt32 streamPos;\r
+ UInt32 lenLimit;\r
+\r
+ UInt32 cyclicBufferPos;\r
+ UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */\r
+\r
+ Byte streamEndWasReached;\r
+ Byte btMode;\r
+ Byte bigHash;\r
+ Byte directInput;\r
+\r
+ UInt32 matchMaxLen;\r
+ CLzRef *hash;\r
+ CLzRef *son;\r
+ UInt32 hashMask;\r
+ UInt32 cutValue;\r
+\r
+ Byte *bufferBase;\r
+ ISeqInStream *stream;\r
+\r
+ UInt32 blockSize;\r
+ UInt32 keepSizeBefore;\r
+ UInt32 keepSizeAfter;\r
+\r
+ UInt32 numHashBytes;\r
+ size_t directInputRem;\r
+ UInt32 historySize;\r
+ UInt32 fixedHashSize;\r
+ UInt32 hashSizeSum;\r
+ SRes result;\r
+ UInt32 crc[256];\r
+ size_t numRefs;\r
+\r
+ UInt64 expectedDataSize;\r
} CMatchFinder;\r
\r
-#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)\r
+#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)\r
\r
-#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)\r
+#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)\r
\r
#define Inline_MatchFinder_IsFinishedOK(p) \\r
((p)->streamEndWasReached \\r
&& (p)->streamPos == (p)->pos \\r
&& (!(p)->directInput || (p)->directInputRem == 0))\r
\r
-int MatchFinder_NeedMove(CMatchFinder *p);\r
-Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);\r
-void MatchFinder_MoveBlock(CMatchFinder *p);\r
-void MatchFinder_ReadIfRequired(CMatchFinder *p);\r
+int\r
+MatchFinder_NeedMove (\r
+ CMatchFinder *p\r
+ );\r
\r
-void MatchFinder_Construct(CMatchFinder *p);\r
+Byte *\r
+MatchFinder_GetPointerToCurrentPos (\r
+ CMatchFinder *p\r
+ );\r
+\r
+void\r
+MatchFinder_MoveBlock (\r
+ CMatchFinder *p\r
+ );\r
+\r
+void\r
+MatchFinder_ReadIfRequired (\r
+ CMatchFinder *p\r
+ );\r
+\r
+void\r
+MatchFinder_Construct (\r
+ CMatchFinder *p\r
+ );\r
\r
/* Conditions:\r
historySize <= 3 GB\r
keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB\r
*/\r
-int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,\r
- UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,\r
- ISzAllocPtr alloc);\r
-void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc);\r
-void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems);\r
-void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);\r
-\r
-UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,\r
- UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,\r
- UInt32 *distances, UInt32 maxLen);\r
+int\r
+MatchFinder_Create (\r
+ CMatchFinder *p,\r
+ UInt32 historySize,\r
+ UInt32 keepAddBufferBefore,\r
+ UInt32 matchMaxLen,\r
+ UInt32 keepAddBufferAfter,\r
+ ISzAllocPtr alloc\r
+ );\r
+\r
+void\r
+MatchFinder_Free (\r
+ CMatchFinder *p,\r
+ ISzAllocPtr alloc\r
+ );\r
+\r
+void\r
+MatchFinder_Normalize3 (\r
+ UInt32 subValue,\r
+ CLzRef *items,\r
+ size_t numItems\r
+ );\r
+\r
+void\r
+MatchFinder_ReduceOffsets (\r
+ CMatchFinder *p,\r
+ UInt32 subValue\r
+ );\r
+\r
+UInt32 *\r
+GetMatchesSpec1 (\r
+ UInt32 lenLimit,\r
+ UInt32 curMatch,\r
+ UInt32 pos,\r
+ const Byte *buffer,\r
+ CLzRef *son,\r
+ UInt32 _cyclicBufferPos,\r
+ UInt32 _cyclicBufferSize,\r
+ UInt32 _cutValue,\r
+ UInt32 *distances,\r
+ UInt32 maxLen\r
+ );\r
\r
/*\r
Conditions:\r
Mf_GetPointerToCurrentPos_Func's result must be used only before any other function\r
*/\r
\r
-typedef void (*Mf_Init_Func)(void *object);\r
-typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);\r
-typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);\r
-typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);\r
-typedef void (*Mf_Skip_Func)(void *object, UInt32);\r
-\r
-typedef struct _IMatchFinder\r
-{\r
- Mf_Init_Func Init;\r
- Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;\r
- Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;\r
- Mf_GetMatches_Func GetMatches;\r
- Mf_Skip_Func Skip;\r
+typedef void (*Mf_Init_Func)(\r
+ void *object\r
+ );\r
+typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(\r
+ void *object\r
+ );\r
+typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(\r
+ void *object\r
+ );\r
+typedef UInt32 (*Mf_GetMatches_Func)(\r
+ void *object,\r
+ UInt32 *distances\r
+ );\r
+typedef void (*Mf_Skip_Func)(\r
+ void *object,\r
+ UInt32\r
+ );\r
+\r
+typedef struct _IMatchFinder {\r
+ Mf_Init_Func Init;\r
+ Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;\r
+ Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;\r
+ Mf_GetMatches_Func GetMatches;\r
+ Mf_Skip_Func Skip;\r
} IMatchFinder;\r
\r
-void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);\r
-\r
-void MatchFinder_Init_LowHash(CMatchFinder *p);\r
-void MatchFinder_Init_HighHash(CMatchFinder *p);\r
-void MatchFinder_Init_3(CMatchFinder *p, int readData);\r
-void MatchFinder_Init(CMatchFinder *p);\r
-\r
-UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);\r
-UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);\r
-\r
-void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);\r
-void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);\r
+void\r
+MatchFinder_CreateVTable (\r
+ CMatchFinder *p,\r
+ IMatchFinder *vTable\r
+ );\r
+\r
+void\r
+MatchFinder_Init_LowHash (\r
+ CMatchFinder *p\r
+ );\r
+\r
+void\r
+MatchFinder_Init_HighHash (\r
+ CMatchFinder *p\r
+ );\r
+\r
+void\r
+MatchFinder_Init_3 (\r
+ CMatchFinder *p,\r
+ int readData\r
+ );\r
+\r
+void\r
+MatchFinder_Init (\r
+ CMatchFinder *p\r
+ );\r
+\r
+UInt32\r
+Bt3Zip_MatchFinder_GetMatches (\r
+ CMatchFinder *p,\r
+ UInt32 *distances\r
+ );\r
+\r
+UInt32\r
+Hc3Zip_MatchFinder_GetMatches (\r
+ CMatchFinder *p,\r
+ UInt32 *distances\r
+ );\r
+\r
+void\r
+Bt3Zip_MatchFinder_Skip (\r
+ CMatchFinder *p,\r
+ UInt32 num\r
+ );\r
+\r
+void\r
+Hc3Zip_MatchFinder_Skip (\r
+ CMatchFinder *p,\r
+ UInt32 num\r
+ );\r
\r
EXTERN_C_END\r
\r