# HG changeset patch # User Carl Byington # Date 1406830701 25200 # Node ID 9a657362519c0f271be9251605c27ff5343bf167 # Parent 97da8c5fb40aff6a4478753f5dd2e62960efdbbf pickup compression from trilead diff -r 97da8c5fb40a -r 9a657362519c src/ch/ethz/ssh2/compression/CompressionFactory.java --- a/src/ch/ethz/ssh2/compression/CompressionFactory.java Thu Jul 31 11:15:15 2014 -0700 +++ b/src/ch/ethz/ssh2/compression/CompressionFactory.java Thu Jul 31 11:18:21 2014 -0700 @@ -59,7 +59,7 @@ getEntry(compressorCandidates[i]); } - public static ICompressor createCompressor(String type) { + public static Compressor createCompressor(String type) { try { CompressorEntry ce = getEntry(type); @@ -67,7 +67,7 @@ return null; Class cc = Class.forName(ce.compressorClass); - ICompressor cmp = (ICompressor) cc.newInstance(); + Compressor cmp = (Compressor) cc.newInstance(); return cmp; } catch (Exception e) { diff -r 97da8c5fb40a -r 9a657362519c src/ch/ethz/ssh2/compression/Compressor.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ch/ethz/ssh2/compression/Compressor.java Thu Jul 31 11:18:21 2014 -0700 @@ -0,0 +1,32 @@ +/* + * ConnectBot: simple, powerful, open-source SSH client for Android + * Copyright 2007 Kenny Root, Jeffrey Sharkey + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.ethz.ssh2.compression; + +/** + * @author Kenny Root + * + */ +public interface Compressor { + int getBufferSize(); + + int compress(byte[] buf, int start, int len, byte[] output); + + byte[] uncompress(byte[] buf, int start, int[] len); + + boolean canCompressPreauth(); +} diff -r 97da8c5fb40a -r 9a657362519c src/ch/ethz/ssh2/compression/ICompressor.java --- a/src/ch/ethz/ssh2/compression/ICompressor.java Thu Jul 31 11:15:15 2014 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * ConnectBot: simple, powerful, open-source SSH client for Android - * Copyright 2007 Kenny Root, Jeffrey Sharkey - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package ch.ethz.ssh2.compression; - -/** - * @author Kenny Root - * - */ -public interface ICompressor { - int getBufferSize(); - - int compress(byte[] buf, int start, int len, byte[] output); - - byte[] uncompress(byte[] buf, int start, int[] len); - - boolean canCompressPreauth(); -} diff -r 97da8c5fb40a -r 9a657362519c src/ch/ethz/ssh2/compression/Zlib.java --- a/src/ch/ethz/ssh2/compression/Zlib.java Thu Jul 31 11:15:15 2014 -0700 +++ b/src/ch/ethz/ssh2/compression/Zlib.java Thu Jul 31 11:18:21 2014 -0700 @@ -24,7 +24,7 @@ * @author Kenny Root * */ -public class Zlib implements ICompressor { +public class Zlib implements Compressor { static private final int DEFAULT_BUF_SIZE = 4096; static private final int LEVEL = 5;