| | | 1 | | using System.IO; |
| | | 2 | | |
| | | 3 | | #pragma warning disable S125 // Sections of code should not be commented out |
| | | 4 | | #pragma warning disable SA1005 // Single line comments should begin with single space |
| | | 5 | | |
| | | 6 | | namespace Renci.SshNet.Compression |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Implements Zlib compression algorithm. |
| | | 10 | | /// </summary> |
| | | 11 | | #pragma warning disable CA1711 // Identifiers should not have incorrect suffix |
| | | 12 | | public class ZlibStream |
| | | 13 | | #pragma warning restore CA1711 // Identifiers should not have incorrect suffix |
| | | 14 | | { |
| | | 15 | | //private readonly Ionic.Zlib.ZlibStream _baseStream; |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// Initializes a new instance of the <see cref="ZlibStream" /> class. |
| | | 19 | | /// </summary> |
| | | 20 | | /// <param name="stream">The stream.</param> |
| | | 21 | | /// <param name="mode">The mode.</param> |
| | | 22 | | #pragma warning disable IDE0060 // Remove unused parameter |
| | 0 | 23 | | public ZlibStream(Stream stream, CompressionMode mode) |
| | | 24 | | #pragma warning restore IDE0060 // Remove unused parameter |
| | 0 | 25 | | { |
| | | 26 | | //switch (mode) |
| | | 27 | | //{ |
| | | 28 | | // case CompressionMode.Compress: |
| | | 29 | | // this._baseStream = new Ionic.Zlib.ZlibStream(stream, Ionic.Zlib.CompressionMode.Compress, Ionic.Zl |
| | | 30 | | // break; |
| | | 31 | | // case CompressionMode.Decompress: |
| | | 32 | | // this._baseStream = new Ionic.Zlib.ZlibStream(stream, Ionic.Zlib.CompressionMode.Decompress, Ionic. |
| | | 33 | | // break; |
| | | 34 | | // default: |
| | | 35 | | // break; |
| | | 36 | | //} |
| | | 37 | | |
| | | 38 | | //this._baseStream.FlushMode = Ionic.Zlib.FlushType.Partial; |
| | 0 | 39 | | } |
| | | 40 | | |
| | | 41 | | /// <summary> |
| | | 42 | | /// Writes the specified buffer. |
| | | 43 | | /// </summary> |
| | | 44 | | /// <param name="buffer">The buffer.</param> |
| | | 45 | | /// <param name="offset">The offset.</param> |
| | | 46 | | /// <param name="count">The count.</param> |
| | | 47 | | #pragma warning disable IDE0060 // Remove unused parameter |
| | | 48 | | public void Write(byte[] buffer, int offset, int count) |
| | | 49 | | #pragma warning restore IDE0060 // Remove unused parameter |
| | 0 | 50 | | { |
| | | 51 | | //this._baseStream.Write(buffer, offset, count); |
| | 0 | 52 | | } |
| | | 53 | | #pragma warning restore SA1005 // Single line comments should begin with single space |
| | | 54 | | } |
| | | 55 | | } |
| | | 56 | | |
| | | 57 | | #pragma warning restore SA1005 // Single line comments should begin with single space |
| | | 58 | | #pragma warning restore S125 // Sections of code should not be commented out |