I am creating a network application that should be able to switch from normal network traffic to a zlib compressed stream, in the middle of the stream. My thoughts on this issue include a logical switch, which, when the call is turned on, will cause the network code to transmit all the data through a class that I can pass an IEnumerable<byte> , and then pull the unpacked stream, passing it to an existing parsing protocol code.
Things I looked at:
- ZLib.NET - It seems a bit ... Ecclectic, and not quite what I want. However, it’s still a good idea to start building. ( John Skeet's comments here hardly inspire me.)
- SharpZipLib - Does n't it seem to support zlib at all? Can anyone confirm or deny this?
I would really like everything to manage the solution, but let it have ... are there any other implementations of this library in .NET that may be better suited for what I want to do, or do I need to take ZLib.NET and build it like a start?
PS:
John asked in more detail, so here it is.
I am trying to implement MCCP 2 . This includes the signal sent in the network stream, and everything after this signal is a zlib compressed data stream. There are links to what they mean by this in the link above. In any case, to be clear, I am at the end of this (client, not server), and I already have a bunch of data read from the network stream, and the switch will be in the middle of this (probably at least), so any the solution should be able to add some additional data to it before it takes over NetworkStream (or I manually load the rest of the data).
Matthew scharley
source share