CompressionAlgs Structure/Class


struct FlowSshC_CompressionAlgs
  byte m_zlib;
  byte m_none;


struct CompressionAlgs : public FlowSshC_CompressionAlgs
    m_zlib = 0; m_none = 1;


public sealed class CompressionAlgs
  public byte Zlib;
  public byte None;
  public CompressionAlgs()
    Zlib = 0; None = 1;


  • Zlib: Priority of "zlib".
  • None: Priority of "none" (no compression used).


The CompressionAlgs structure/class is used to configure compression algorithms for the session. Currently, the only compression algorithm defined by the SSH specification is "zlib". For member values the following rules apply:

  • An algorithm is enabled if it holds a non-zero value.
  • Algorithms with lower non-zero values precede algorithms with higher values.
  • Algorithms holding the same non-zero value are ordered by their declaration order.
  • You should NOT disable the "none" algorithm in this section: it is required for interoperability. However, you can enable or disable the "zlib" algorithm at will, in order to optimize your connection.

By default, "zlib" compression is disabled because in modern high-bandwidth environments, compression actually slows down the rate of file transfer instead of increasing it. If you have a connection that would benefit from compression, e.g. due to low bandwidth and because you are transfering highly-compressible data, enable the "zlib" algorithm. Note of course that even if you enable the "zlib" algorithm, it will not be used unless it is also enabled and supported at the SSH server.