private void initInflater(string method) { if (method.Equals("none")) { inflater = null; return; } string foo = getConfig(method); if (foo != null) { if (method.Equals("zlib") || (isAuthed && method.Equals("*****@*****.**"))) { try { Type c = Type.GetType(foo); inflater = (Compression)(c.newInstance()); inflater.init(Compression.INFLATER, 0); } catch (Exception ee) { throw new JSchException(ee.ToString(), ee); //Console.Error.WriteLine(foo+" isn't accessible."); } } } }
private void initDeflater(string method) { if (method.Equals("none")) { deflater = null; return; } string foo = getConfig(method); if (foo != null) { if (method.Equals("zlib") || (isAuthed && method.Equals("*****@*****.**"))) { try { Type c = Type.GetType(foo); deflater = (Compression)(c.newInstance()); int level = 6; try { level = int.Parse(getConfig("compression_level")); } catch /*(Exception ee)*/ { } deflater.init(Compression.DEFLATER, level); } catch (Exception ee) { throw new JSchException(ee.ToString(), ee); //Console.Error.WriteLine(foo+" isn't accessible."); } } } }