Page 1 of 1

Compressing a string with PHP / decompressing with VB?

Posted: Tue Feb 15, 2005 4:18 pm
by Swede78
I'm trying to compress a dynamically created string that can be read by software on a client computer via an http connection. The programmer of the software needs to be able to decompress this data using Visual Basic. But he cannot decompress it when it's compressed using PHP's functions; gzcompress, gzencode, or bzcompress. Does anyone have any suggestions of how we can make PHP compression work with VB compression?

Posted: Wed Feb 16, 2005 8:39 am
by Maugrim_The_Reaper
1. zlib (gzip) is a standard compression format which is independent of either php or VB.
2. Info on libraries for different languages can be found in most unlikely of places: http://www.gzip.org/ - look for the zlib libraries...there is one for VB.

Posted: Thu Feb 17, 2005 10:02 am
by Swede78
Thank you Maugrim, I'll take a look. Otherwise, the VB programmer thinks they can get BZip to work.

Posted: Thu Feb 17, 2005 10:09 am
by Maugrim_The_Reaper
You should be able to get either working for VB - all you need is the necessary compression library for VB, include it in your project, and use whatever API it offers. Google can probably supply any number of tutorials on setting this up if required...:)

Posted: Thu Feb 17, 2005 4:08 pm
by Swede78
The programmer can get files to work with compression and decompression, but not strings.

Posted: Fri Feb 18, 2005 3:15 am
by Maugrim_The_Reaper
From a quick google search of "vb.net zlib string compression":

http://www.eggheadcafe.com/articles/20011226.asp
http://www.eggheadcafe.com/articles/20011229.asp