Closed DanielRuf closed 5 years ago
LZ4FrameOutputStream
accepts original uncompressed data, not compressed data.
LZ4Factory factory = LZ4Factory.fastestInstance();
byte[] data = "12345345234572".getBytes("UTF-8");
FileOutputStream outputStream = new FileOutputStream(new File("test.lz4"));
LZ4FrameOutputStream stream = new LZ4FrameOutputStream(outputStream);
stream.write(data);
stream.close();
Oh ok. Checked the Block example in a few issues but it adds LZ4Block
to generated files.
The docs seem a bit unclear for me to easily generate a LZ4 file / archive from another file.
Or did I oversee something?
Thanks for the feedback. I agree that the documentation is too lean. I'll add some examples.
Added an example with d6759a6bab9cd869bdd25ca8ea20228dc7594d3b.
After this I use 7z-zstd and get a file with the content
à123...
, VS Code shows�12345345234572
and a few other invisible characters at the end.What is the correct and recommended way to compress data (file / files) to a single lz4 archive / file?