public class BlockLZ4CompressorOutputStream extends CompressorOutputStream
Constructor and Description |
---|
BlockLZ4CompressorOutputStream(java.io.OutputStream os)
Creates a new LZ4 output stream.
|
BlockLZ4CompressorOutputStream(java.io.OutputStream os,
Parameters params)
Creates a new LZ4 output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
static Parameters.Builder |
createParameterBuilder()
Returns a builder correctly configured for the LZ4 algorithm.
|
void |
finish()
Compresses all remaining data and writes it to the stream,
doesn't close the underlying stream.
|
void |
prefill(byte[] data,
int off,
int len)
Adds some initial data to fill the window with.
|
void |
write(byte[] data,
int off,
int len) |
void |
write(int b) |
public BlockLZ4CompressorOutputStream(java.io.OutputStream os) throws java.io.IOException
os
- An OutputStream to read compressed data fromjava.io.IOException
- if reading failspublic BlockLZ4CompressorOutputStream(java.io.OutputStream os, Parameters params) throws java.io.IOException
os
- An OutputStream to read compressed data fromparams
- The parameters to use for LZ77 compression.java.io.IOException
- if reading failspublic void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] data, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public void finish() throws java.io.IOException
java.io.IOException
- if an error occurspublic void prefill(byte[] data, int off, int len)
data
- the data to fill the window with.off
- offset of real data into the arraylen
- amount of datajava.lang.IllegalStateException
- if the stream has already started to write dataLZ77Compressor.prefill(byte[])
public static Parameters.Builder createParameterBuilder()
Copyright © 2010 - 2020 Adobe. All Rights Reserved