Click to See Complete Forum and Search --> : uncompress with VB.net


semidieu
04-03-2005, 10:40 AM
Is it possible to uncompress a file using VB.net ?

Thanks a lot

pclement
04-03-2005, 11:05 AM
What kind of file are you trying to uncompress? Zip file?

semidieu
04-03-2005, 11:24 AM
They are text file compressed using zlib... I would like to read the text files in VB.net.

Thanks.

Basil

oupoi
04-04-2005, 05:03 AM
I prefer to use SharpZipLib to handle zip file in .Net. :D

http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx

Jamie
04-04-2005, 05:13 AM
Well then you'll need to get your hands on the zlib library to perform the decompression :)

pclement
04-04-2005, 08:24 AM
They are text file compressed using zlib... I would like to read the text files in VB.net.

Thanks.

Basil

See if the following helps:

http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/9f135b4ab503a8a2/a51408a1595f74d7?q=zlib+vb.net&rnum=3#a51408a1595f74d7

http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/32a85c324f7edc0c/e28bddae98d7cdf3?q=zlib+vb.net&rnum=9#e28bddae98d7cdf3

semidieu
04-04-2005, 11:47 AM
i must say i don't understant how to make this work...

I have the zlib1.dll (the newer version). I go over the above website, but don't understand how (and where) to put all this code...

Can someone supply a "tutorial" for a really newbie ?

Thanks for your help !

semidieu
04-04-2005, 12:48 PM
I had tried again... and must say i'm really lost... I don't know how this works...

i just want to be able to use two functions:

compress(filename of the uncompressed file, filename of the compressed file)

or

decompress(filename of the compressed file, filename of the uncompressed file)

pclement
04-04-2005, 04:48 PM
Do you have a sample file you can post?

semidieu
04-05-2005, 12:18 PM
Don't know if you know this program. It's called Poser. The version 5 (and the new one, version 6) can have compressed file. It use zlib to compress (or uncompress), using python script within Poser.

Here are sample files (compressed and uncompressed). Do i have to give also the version of zlib i have ?

Just to be clear (and because my english isn't very good...):

i would like to be able to read a compressed file using the readline function in Visual Basic .net.

What i thought to do is:

Converting a compressed file to a new temporary uncompressed file and save this new file.
Read the new uncompressed file using standart methods.

What i would like is to have a function that accept two values:

1° original compressed filename
2° target uncompressed filename

My knowledge in Visual Basic .net is very low... I'm still learning, and still at the beginning.


Hope you understand what i would like !

Basil

pclement
04-06-2005, 10:31 AM
My first attempt at decompressing the .crz file using a .NET zlib component failed. I'm not sure how the information was written to this file but it almost looks like binary or encoded text.

I will check for some COM wrappers for the zlib DLL to see if there is any way to handle these files.

semidieu
04-06-2005, 01:19 PM
Thanks for your help !

The only thing i can say for your help is that Poser use Python script to compress/uncompress this files. It is said in the manual that it uses zlib compression.