|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 using System; |
|
18 using System.Collections.Generic; |
|
19 using System.Text; |
|
20 using System.IO; |
|
21 using System.Runtime.InteropServices; |
|
22 using SymbianStructuresLib.Compression.Common; |
|
23 |
|
24 namespace SymbianStructuresLib.Compression.Inflate |
|
25 { |
|
26 public class SymbianDecompressorInflate : SymbianDecompressor |
|
27 { |
|
28 #region Constructors |
|
29 public SymbianDecompressorInflate() |
|
30 { |
|
31 } |
|
32 #endregion |
|
33 |
|
34 #region From SymbianDecompressor |
|
35 public override TSymbianCompressionType Type |
|
36 { |
|
37 get { return TSymbianCompressionType.EDeflate; } |
|
38 } |
|
39 |
|
40 protected override int DoDecompressRaw( IntPtr aSource, int aSourceLength, IntPtr aDestination, int aDestinationLength ) |
|
41 { |
|
42 throw new NotSupportedException(); |
|
43 } |
|
44 |
|
45 protected override int DoDecompressImage( IntPtr aSource, int aSourceLength, IntPtr aDestination, int aDestinationLength, out int aAmountOfSourceRead ) |
|
46 { |
|
47 int ret = SymbianInflateImage( aSource, aSourceLength, aDestination, aDestinationLength ); |
|
48 aAmountOfSourceRead = aSourceLength; |
|
49 return ret; |
|
50 } |
|
51 #endregion |
|
52 |
|
53 #region Properties |
|
54 #endregion |
|
55 |
|
56 #region Internal methods |
|
57 [DllImport("SymbianNativeTools.dll")] |
|
58 public static extern int SymbianInflateImage( IntPtr aSource, int aSourceSize, IntPtr aDest, int aDestSize ); |
|
59 #endregion |
|
60 |
|
61 #region Data members |
|
62 #endregion |
|
63 } |
|
64 } |