diff -r 000000000000 -r 307788aac0a8 realtimenetprots/sipfw/SigComp/CompDeflate/inc/Deflate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/realtimenetprots/sipfw/SigComp/CompDeflate/inc/Deflate.h Tue Feb 02 01:03:15 2010 +0200 @@ -0,0 +1,303 @@ +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : CDeflate.h +* Part of : deflatecomp / deflatecomp +* deflate compressor header file. +* Version : 1.0 +* +*/ + + + + +/** + @internalComponent +*/ + +#ifndef CDEFLATE_H +#define CDEFLATE_H + +class CSigCompDeflateContext; +class CMessageWriter; + +const TInt KMaxBits = 15; +const TInt KLengthCodes = 29; +const TInt KLiterals = 256; +const TInt KLiteralCodes = (KLiterals + 1 + KLengthCodes); +const TInt KDistanceCodes = 30; +const TInt KMinMatch = 3; +const TInt KMaxMatch = 258; +const TUint KEncodeDistance = 256; + +/** length of good match, search stops after one of this length +has been found +*/ +const TInt KGoodMatchLength = 16; + +/** length of nice match, chainlength will be reduced if one of +this length has been found +*/ +const TInt KNiceMatchLength = 8; + +/** Do not perform lazy matching if we found match of this length +*/ +const TInt KNiceLazyMatchLength = 16; + + +/** maximum number of chains linked to one hash table entry */ +const TInt KMaxChainLength = 32; + +/* +number of bits for hash table. hash table size = 1<* iHashTable; + + /** number of bytes queued */ + TInt iLookAhead; + + /** array of nodes, those are used as linked elements in hash table */ + CArrayFixFlat* iChainNodes; + + /** modulo mask for chain nodes, iWindowSize - 1 */ + TInt iChainMask; + + /** output buffer, encoded bitstream is stored there */ + CMessageWriter* iMessageWriter; + + /** determines whenever compression is dynamic or not */ + TBool iDynamic; + + /** deflate compression context */ + CSigCompDeflateContext* iDeflateContext; + }; + +#endif