Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6922119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:21:55+00:00 2026-05-27T10:21:55+00:00

In particular I am using a Ionic.Zlib.ZlibStream to do Zlib compression on a System.Net.Sockets.NetworkStream

  • 0

In particular I am using a Ionic.Zlib.ZlibStream to do Zlib compression on a System.Net.Sockets.NetworkStream.

Problem is, ZlibStream is a one-way stream; you can Read() or Write() but not both. You need two separate streams, one for sending and one for receiving (one compressing and the other decompressing). Which works fine until you need to pass it to functions that are expecting a single two-way stream (both Read() and Write() functionality). For example, new System.Net.Security.SslStream(Stream base).

I realize I can write a Stream class that takes a writing-stream and a reading-stream and calls the correct stream in the overrides. But I was hoping this already exists in the framework somewhere or there was an implementation already available.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:21:55+00:00Added an answer on May 27, 2026 at 10:21 am

    I’m pretty sure there is no class that will do this for you. However, the wrapper class you’ll need to write is simple and shouldn’t take you very long at all.

    You will probably inherit from Stream, but if you analyze your needs and the other available stream types, you may find that inheriting from a more specific class will help you out.

    Edit: Due to Lucas B’s comments.

    Please keep in mind that normal uses of Stream objects require that they actually inherit from Stream. Otherwise, you can’t pass it as a parameter to a large number functions that expect a stream.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a bit of trouble with one particular issue using JPA/Spring: How can
How i can find all the windows created by a particular process using c#?
I'm using a particular database table like a Set data structure, i.e., you can
Please give me the advantages and disadvantages of using the particular framework. Can give
Not sure if yall can help this time, as I'm just using this particular
I know that I can display time for a particular location using only JavaScript
Please guide me how can I find a particular div using jQuery for following
I'm big fan of the MVVM pattern, in particular while using the ASP.NET MVC
How can I get the CPU and Memory usage of a particular process using
I'm trying to solve this particular problem using c++. Problem: Given a set of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.