Skip to content

Commit

Permalink
[addax-storage] Add support for reading lzop compress file
Browse files Browse the repository at this point in the history
DO NOT support lzop version 1.0.4 or later
  • Loading branch information
wgzhao committed Nov 29, 2021
1 parent 08691e3 commit 0d955e0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.csvreader.CsvReader;
import com.wgzhao.addax.common.base.Constant;
import com.wgzhao.addax.common.base.Key;
import com.wgzhao.addax.common.compress.ExpandLzopInputStream;
import com.wgzhao.addax.common.compress.ZipCycleInputStream;
import com.wgzhao.addax.common.constant.Type;
import com.wgzhao.addax.common.element.BoolColumn;
Expand Down Expand Up @@ -127,6 +128,10 @@ else if ("zip".equalsIgnoreCase(compress)) {
ZipCycleInputStream zipCycleInputStream = new ZipCycleInputStream(inputStream);
reader = new BufferedReader(new InputStreamReader(zipCycleInputStream, encoding), bufferSize);
}
else if("lzo".equalsIgnoreCase(compress)) {
ExpandLzopInputStream expandLzopInputStream = new ExpandLzopInputStream(inputStream);
reader = new BufferedReader(new InputStreamReader(expandLzopInputStream, encoding), bufferSize);
}
else {
// common-compress supports almost compress alg
CompressorInputStream input = new CompressorStreamFactory().createCompressorInputStream(compress, inputStream, true);
Expand Down

0 comments on commit 0d955e0

Please sign in to comment.