Update contrib.
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\misc\unzip.h
22 #ifdef __KERNEL_MODE__
23 #define MALLOC(x) Kern::Alloc(x)
24 #define FREE(x) Kern::Free(x)
25 #define WAIT_FOR_ANY_REQUEST() Kern::WaitForAnyRequest()
28 #define MALLOC(x) User::Alloc(x)
29 #define FREE(x) User::Free(x)
30 #define WAIT_FOR_ANY_REQUEST() User::WaitForAnyRequest()
31 #define WAIT_FOR_REQUEST(x) User::WaitForRequest(x)
32 #define DELAY(x) User::After(x)
35 const TInt KZipLocalHeaderLen=30;
36 const TInt KZipExtHeaderLen=16;
37 const TUint KZipSignature=0x04034b50u;
38 const TInt KZipWindowSize=0x8000;
47 TInt iUncompressedSize;
53 TUint iInBufSize; // must be a power of 2
54 volatile TUint iFileBufW;
55 volatile TUint iFileBufR;
56 TUint iFileBufSize; // must be a power of 2 and a multiple of iInBufSize
58 TRequestStatus iProcessedHeader;
59 volatile TInt iHeaderDone;
63 TRequestStatus iThreadStatus;
66 GLREF_C void AcceptUnzippedBlock(TZipInfo& aInfo, TUint8*& aOutPtr, TInt aError);
67 GLREF_C TInt InitInfo(TZipInfo& a);
68 GLREF_C TInt UnzipThread(TAny* aInfo);
69 GLREF_C TInt ReadBlockToBuffer(TZipInfo& a);
70 GLREF_C TInt ReadInputData(TUint8* aDest, TInt& aLength);
71 GLREF_C TInt UnzipComplete(TZipInfo& a, TUint8* aOutPtr, TInt aError);