First public contribution.
1 // Copyright (c) 1995-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 // f32\sfile\sf_decomp.cpp
18 #include "sf_deflate.h"
23 TFileInput::TFileInput(RFile& aFile)
24 :iFile(aFile),iReadBuf(iBuf1),iPtr(iBuf1,KBufSize)
27 aFile.Read(iPtr,iStat);
30 void TFileInput::Cancel()
32 // absorb signal if outstanding request
34 User::WaitForRequest(iStat);
37 void TFileInput::UnderflowL()
41 User::WaitForRequest(iStat);
43 User::LeaveIfError(iStat.Int());
45 User::Leave(KErrCorrupt);
46 Set(b,iPtr.Length()*8);
47 // start reading to the next buffer
48 b = b==iBuf1 ? iBuf2 : iBuf1;
49 iPtr.Set(b,0,KBufSize);
50 iFile.Read(iPtr,iStat);