Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 994
Add support for Zlib compression (.NET 6.0 onward only)#1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
b219168beafd8237dc55c8fb67f77762748e7cdd32684298cbcd275f903e35c6a6503e38f7485a4c97b2e7fcad329f502ce2b69753667296cb98229e7ff21e7ebf78c16b0745d5d74a182432158ef8583722f50786ce31977c475dacbb217File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,17 @@ | ||
| using Renci.SshNet.Messages.Authentication; | ||
| #if NET6_0_OR_GREATER | ||
| namespace Renci.SshNet.Compression | ||
| { | ||
| /// <summary> | ||
| /// Represents "zlib@openssh.org" compression implementation. | ||
| /// </summary> | ||
| public class ZlibOpenSsh : Compressor | ||
| internal sealed class ZlibOpenSsh : Zlib | ||
| { | ||
| /// <summary> | ||
| /// Gets algorithm name. | ||
| /// </summary> | ||
| public override string Name | ||
| public ZlibOpenSsh() | ||
| : base(delayedCompression: true) | ||
| { | ||
| get { return "zlib@openssh.org"; } | ||
| } | ||
| /// <summary> | ||
| /// Initializes the algorithm. | ||
| /// </summary> | ||
| /// <param name="session">The session.</param> | ||
| public override void Init(Session session) | ||
| { | ||
| base.Init(session); | ||
| session.UserAuthenticationSuccessReceived += Session_UserAuthenticationSuccessReceived; | ||
| } | ||
| private void Session_UserAuthenticationSuccessReceived(object sender, MessageEventArgs<SuccessMessage> e) | ||
| public override string Name | ||
| { | ||
| IsActive = true; | ||
| Session.UserAuthenticationSuccessReceived -= Session_UserAuthenticationSuccessReceived; | ||
| get { return "zlib@openssh.com"; } | ||
| } | ||
| } | ||
| } | ||
| #endif |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.