public class OldLZMACompressor extends java.lang.Object implements Compressor
Compressor.COMPRESSOR_TYPEDEFAULT_COMPRESSORDESCRIPTOR| Constructor and Description |
|---|
OldLZMACompressor() |
| Modifier and Type | Method and Description |
|---|---|
Bucket |
compress(Bucket data,
BucketFactory bf,
long maxReadLength,
long maxWriteLength)
Deprecated.
|
long |
compress(java.io.InputStream is,
java.io.OutputStream os,
long maxReadLength,
long maxWriteLength)
Deprecated.
|
long |
compress(java.io.InputStream input,
java.io.OutputStream output,
long maxReadLength,
long maxWriteLength,
long amountOfDataToCheckCompressionRatio,
int minimumCompressionPercentage)
Compress the data (@see
Compressor.compress(InputStream, OutputStream, long, long)) with checking of compression effect. |
Bucket |
decompress(Bucket data,
BucketFactory bf,
long maxLength,
long maxCheckSizeLength,
Bucket preferred) |
int |
decompress(byte[] dbuf,
int i,
int j,
byte[] output)
Decompress in RAM only.
|
long |
decompress(java.io.InputStream is,
java.io.OutputStream os,
long maxLength,
long maxCheckSizeBytes)
Decompress data.
|
@Deprecated public Bucket compress(Bucket data, BucketFactory bf, long maxReadLength, long maxWriteLength) throws java.io.IOException, CompressionOutputSizeException
Compressorcompress in interface Compressordata - The bucket to read from.bf - The means to create a new bucket.maxReadLength - The maximum number of bytes to read from the input bucket.maxWriteLength - The maximum number of bytes to write to the output bucket. If this is exceeded, throw a CompressionOutputSizeException.java.io.IOException - If an error occurs reading or writing data.CompressionOutputSizeException - If the compressed data is larger than maxWriteLength.@Deprecated
public long compress(java.io.InputStream is,
java.io.OutputStream os,
long maxReadLength,
long maxWriteLength)
throws java.io.IOException,
CompressionOutputSizeException
Compressorcompress in interface Compressoris - The InputStream to read from.os - The OutputStream to write to.maxReadLength - The maximum number of bytes to read from the input bucket.maxWriteLength - The maximum number of bytes to write to the output bucket. If this is exceeded, throw a CompressionOutputSizeException.java.io.IOException - If an error occurs reading or writing data.CompressionOutputSizeException - If the compressed data is larger than maxWriteLength.public long compress(java.io.InputStream input,
java.io.OutputStream output,
long maxReadLength,
long maxWriteLength,
long amountOfDataToCheckCompressionRatio,
int minimumCompressionPercentage)
throws java.io.IOException
CompressorCompressor.compress(InputStream, OutputStream, long, long)) with checking of compression effect.compress in interface CompressoramountOfDataToCheckCompressionRatio - The data amount after compression of which we will check whether we have got the desired effect.minimumCompressionPercentage - The minimal desired compression effect, %. A value of 0 means that the
compression effect will not be checked.java.io.IOExceptionpublic Bucket decompress(Bucket data, BucketFactory bf, long maxLength, long maxCheckSizeLength, Bucket preferred) throws java.io.IOException, CompressionOutputSizeException
java.io.IOExceptionCompressionOutputSizeExceptionpublic long decompress(java.io.InputStream is,
java.io.OutputStream os,
long maxLength,
long maxCheckSizeBytes)
throws java.io.IOException,
CompressionOutputSizeException
Compressordecompress in interface Compressoris - Where to read the data to decompress fromos - Where to write the final product tomaxLength - The maximum length to decompress (we throw if more is present).maxCheckSizeBytes - If the data is too big, and this is >0, read up to this many bytes in order to try to get the data size.java.io.IOExceptionCompressionOutputSizeExceptionpublic int decompress(byte[] dbuf,
int i,
int j,
byte[] output)
throws CompressionOutputSizeException
Compressordecompress in interface Compressordbuf - Input buffer.i - Offset to start reading from.j - Number of bytes to read.output - Output buffer.CompressionOutputSizeException