TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nikola Rosic
NA
4
0
Zlib decompress
Jul 15 2008 2:10 AM
I'm connecting with C# to a device over ethernet and sending him messages and reading from it.Everything is working fine for one specific message i'm getting a message compressed with RFC 1950.I have installed ICSharpCode.SharpZipLib but it is not working.Here is the code:
//TcpClient
TcpClient client = new TcpClient();
IPAddress localAddr = IPAddress.Parse("192.168.1.84");
int port = 10001;
client.Connect(localAddr, port);
//Stream stream = client.GetStream();
NetworkStream stream = client.GetStream();
byte[] data2 = new byte[30];
stream.Write(data2, 0, length1); //this is what am i sendig
//after I write something on the device he is returning me hex values which are commpres
//i have tried with zlib.net.dll
//and with ICSharpCode.SharpZipLib and it doesn't work can anyone help!!!
//this is my code teh read is just waiting and does nothing
ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream c = new InflaterInputStream(stream);
c.Read(data, 0, 150);
P.S i have allready tried with deflate stream and also doesn't work!!!
Reply
Answers (
2
)
proxy server in C#
How to return a value from a select procedure?