5
5
namespace Renci . SshNet . Compression
6
6
{
7
7
/// <summary>
8
- /// Represents "zlib" compression implementation .
8
+ /// Represents the "zlib" compression algorithm .
9
9
/// </summary>
10
- internal class Zlib : Compressor
10
+ public class Zlib : Compressor
11
11
{
12
12
private readonly ZLibStream _compressor ;
13
13
private readonly ZLibStream _decompressor ;
14
14
private MemoryStream _compressorStream ;
15
15
private MemoryStream _decompressorStream ;
16
16
private bool _isDisposed ;
17
17
18
+ /// <summary>
19
+ /// Initializes a new instance of the <see cref="Zlib"/> class.
20
+ /// </summary>
18
21
public Zlib ( )
19
22
: this ( delayedCompression : false )
20
23
{
21
24
}
22
25
26
+ /// <summary>
27
+ /// Initializes a new instance of the <see cref="Zlib"/> class.
28
+ /// </summary>
29
+ /// <param name="delayedCompression">
30
+ /// <inheritdoc cref="Compressor(bool)" path="/param[@name='delayedCompression']"/>
31
+ /// </param>
23
32
protected Zlib ( bool delayedCompression )
24
33
: base ( delayedCompression )
25
34
{
@@ -30,14 +39,13 @@ protected Zlib(bool delayedCompression)
30
39
_decompressor = new ZLibStream ( _decompressorStream , CompressionMode . Decompress ) ;
31
40
}
32
41
33
- /// <summary>
34
- /// Gets algorithm name.
35
- /// </summary>
42
+ /// <inheritdoc/>
36
43
public override string Name
37
44
{
38
45
get { return "zlib" ; }
39
46
}
40
47
48
+ /// <inheritdoc/>
41
49
protected override byte [ ] CompressCore ( byte [ ] data , int offset , int length )
42
50
{
43
51
_compressorStream . SetLength ( 0 ) ;
@@ -48,6 +56,7 @@ protected override byte[] CompressCore(byte[] data, int offset, int length)
48
56
return _compressorStream . ToArray ( ) ;
49
57
}
50
58
59
+ /// <inheritdoc/>
51
60
protected override byte [ ] DecompressCore ( byte [ ] data , int offset , int length )
52
61
{
53
62
_decompressorStream . Write ( data , offset , length ) ;
0 commit comments