fingltd / 4mc

4mc - splittable lz4 and zstd in hadoop/spark/flink
Other
108 stars 36 forks source link

Writing to standard output #10

Closed rupenp closed 9 years ago

rupenp commented 9 years ago

Hi,

Great project. I was wondering if its possible to write to standard output when decompressing?

carlomedas commented 9 years ago

Please try to use special char dash - To make it write to stdout.

rupenp commented 9 years ago

Yes. I tried that, didn't work for me. This is what i did.

./4mc myfile.4mc -

Its saying "Incorrect command line arguments"

And I also tried using "-c" (not in usage help, but is a switch case) which states following: // Force stdout, even if stdout==console case 'c': forceStdout=1; output_filename=stdoutmark; displayLevel=1; break;

./4mc myfile.4mc -c

This just outputs compressed data back to stdout, and not uncompressed.

carlomedas commented 9 years ago

I see. The cli code was ported almost as-is from lz4 cli, so I don't have perfect overview but I'll have an eye as soon as I get a chance. If it happens that you find the bug in the code, please feel free to contribute, much appreciated!

Cyan4973 commented 9 years ago

If you need both decompression and display result on the console, then maybe -dc will do the trick.

rupenp commented 9 years ago

Yes. I just figured that out (was about to write back that the decode flag wasn't being set with just '-c') Great! thank you

carlomedas commented 9 years ago

Thanks Yann!