How to decompress lzo_deflate file? How to decompress lzo_deflate file? unix unix

How to decompress lzo_deflate file?


.lzo_deflate means an LZO stream without the usual header and trailer. So you would need to wrap the raw .lzo_deflate stream with the header and trailer expected by lzop. Or at least the header, and then ignore errors from the missing trailer. You'll need to look at the header and trailer documentation.

The "deflate" in the name is an odd choice, but it refers to the gzip analogy, where the raw compressed data format without the gzip header and trailer is called deflate.


I came across the same issue. The reason it happened because I was not using the right codec. Please check your codec in job configuration.

job.getConfiguration().set("mapred.output.compression.codec","com.hadoop.compression.lzo.LzopCodec");


This answer helped me to convert from .lzo_deflate to required output format:

hadoop jar $HADOOP_HOME/contrib/streaming/hadoop-streaming-0.20.2-cdh3u2.jar \  -Dmapred.output.compress=true \  -Dmapred.compress.map.output=true \  -Dmapred.output.compression.codec=org.apache.hadoop.io.compress.GzipCodec \  -input <input-path> \  -output $OUTPUT \  -mapper "/bin/cat"