Thanks.
"John" <john...@rediffmail.com> wrote in message
news:ba129ce7.03090...@posting.google.com...
I am testing it now with some dummy data, 1000 files in a 7 MB zip
file. It is taking 17 sec for the ZipFile class to open it on the
emulator. I am using ZipFile class instead of the ZipInputStream class
since I need to extract specific files. So I need
ZipFile.GetInputStream(ZipEntry) rather than
ZipInputStream.GetNextEntry();
Is this delay normal? Seems a bit too long even if it is only once. Is
there a more efficient way to do it?
Thanks again.
"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message news:<u0KTukQ...@TK2MSFTNGP11.phx.gbl>...
-Chris
"Eelco Akker" <eelco...@zonnet.nl> wrote in message
news:eult1OVc...@TK2MSFTNGP12.phx.gbl...
> Dear Alex,
>
> Posted a message at the SharpZiplib Forum and this is what I got.
>
> *************************************************************************
>
>
> 1 Posts
> Posted - 09/02/2003 : 03:13:52
> --------------------------------------------------------------------
>
> Is there already a correct SharpZipLib for the Compact
Framework
>
> I know it is supported, but according to the MS Compact
> Framework newsgroup I should edit some C# source and recompile.
>
> However C# is not my thing, VB .NET is. Can somebody help me ?
>
> (Posting on MS newsgroup)
>
> SharpZLib is compiled against full framework and won't run on
> the CF because
> it references couple of things that are missing from CF. Aside
> of that it
> references wrong system assemblies. I was able to recompile it
> very quickly
> for CF. All that I had to do was to replace calls to
> Console.Error with
> Console and remove attempt to use BufferedStream. The rest is
> obvious.
> Unfortunately I cannot post the results as it would violate
GPL,
> but the
> process is really straightforward.
>
>
> bspuida
>
>
> Austria
> 530 Posts
> Posted - 09/02/2003 : 05:30:41
> --------------------------------------------------------------------
>
> We here at the core team do not at all understand how
modifying
> source code would be against the GPL - after all the GPL expressly allows
> modification of code, provided it is made publicly available. *Not*
> publishing the code modification violates the GPL. Please notify the
author
> of said post of this. We would be happy to see a CF version of the library
> for all of you out there who need it.
>
>
>
>
>
> I am a bit confused about GPL now, what's allowed and what's not ??
>
> Eelco
>
> "Alex Feinman [MVP]" <publi...@alexfeinman.com> schreef in bericht
> news:u0KTukQ...@TK2MSFTNGP11.phx.gbl...
Could you provide me some source samples, howto extract a file on CF
I also recompiled the ZipLib.
But I'm stil getting a missingmethod exception.
This is my source (VB .NET)
----------------------------------------------------------------------------
-----------
Private Sub Unzip(ByVal zipFile As String, ByVal UnzipToFolder As String)
Dim nByte As Integer
Dim s As New ZipInputStream(File.OpenRead(zipFile))
Dim entry As ZipEntry
Dim Zip_Data(2048) As Byte
Zip_Data(2048) = New Byte
entry = s.GetNextEntry
Do
Dim fs As New FileStream(Path.Combine(UnzipToFolder,
Path.GetFileName(entry.Name)), FileMode.Create)
Dim bw As New BinaryWriter(fs, System.Text.Encoding.ASCII)
nByte = s.Read(Zip_Data, 0, Zip_Data.GetLength(0))
While nByte > 0
bw.Write(Zip_Data, 0, nByte)
nByte = s.Read(Zip_Data, 0, Zip_Data.GetLength(0))
End While
fs.Close()
bw.Close()
entry = s.GetNextEntry
Loop While Not (entry Is Nothing)
s.Close()
End Sub
Thanx in advance
"John" <john...@rediffmail.com> schreef in bericht
news:ba129ce7.03090...@posting.google.com...
17 sec is too long for a 200 MHz processor to read that zip. Not too
long ago that was more or less my desktop config. I doubt that it is
the JIT time either. It's only a 68K lib after my trimmings.
Sure Eelco!
Here is my C# snippet
zFile = new ZipFile(@"/Program Files/ZipTestCFCS/z.zip");
ZipEntry MyEntry = zFile.GetEntry("1.txt");
Stream s = zFile.GetInputStream(MyEntry);
int length = Convert.ToInt32(MyEntry.Size);
byte[] ba = new byte[length];
s.Read(ba, 0, length);
Encoding ascii = Encoding.ASCII;
char[] asciiChars = new char[ascii.GetCharCount(ba, 0, ba.Length)];
ascii.GetChars(ba, 0, ba.Length, asciiChars, 0);
return new string(asciiChars);
I did not do anything particularly creative for compiling the lib.
Just created a new project for a Pocket PC lib, drag-dropped Zip and
Checksums folders from the windows explorer to the solution and
compiled.
I can mail you the source of the project and the binary if you want.
That shouldn't violate GPL.
I've only used the GZIP-support, but that works perfectly fine without
any hassles or modifications. Almost like Java ;-)
david
--
Auch das geht vorüber. (Sufi-Weisheit)
Holger (David) Wagner Tel: +49 (89) 890 50 962
Dewetstrasse 1 Mobil: +49 (177) 274 12 45
D-80807 München Fax: +49 (177) 992741245
From http://www.google.com/search?hl=en&q=ziblib+mail&aq=f&oq=&aqi=
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/