/** * Creates a new LZ4 output stream. * * @param os * An OutputStream to read compressed data from * * @throws IOException if reading fails */ public BlockLZ4CompressorOutputStream(final OutputStream os) throws IOException { this(os, createParameterBuilder().build()); }
/** * Sets up custom parameters for the LZ4 stream. * @param blockSize the size of a single block. * @param withContentChecksum whether to write a content checksum * @param withBlockChecksum whether to write a block checksum. * Note that block checksums are not supported by the lz4 * command line utility * @param withBlockDependency whether a block may depend on * the content of a previous block. Enabling this may improve * compression ratio but makes it impossible to decompress the * output in parallel. */ public Parameters(BlockSize blockSize, boolean withContentChecksum, boolean withBlockChecksum, boolean withBlockDependency) { this(blockSize, withContentChecksum, withBlockChecksum, withBlockDependency, BlockLZ4CompressorOutputStream.createParameterBuilder().build()); }
/** * Creates a new LZ4 output stream. * * @param os * An OutputStream to read compressed data from * * @throws IOException if reading fails */ public BlockLZ4CompressorOutputStream(final OutputStream os) throws IOException { this(os, createParameterBuilder().build()); }
/** * Sets up custom parameters for the LZ4 stream. * @param blockSize the size of a single block. * @param withContentChecksum whether to write a content checksum * @param withBlockChecksum whether to write a block checksum. * Note that block checksums are not supported by the lz4 * command line utility * @param withBlockDependency whether a block may depend on * the content of a previous block. Enabling this may improve * compression ratio but makes it impossible to decompress the * output in parallel. */ public Parameters(BlockSize blockSize, boolean withContentChecksum, boolean withBlockChecksum, boolean withBlockDependency) { this(blockSize, withContentChecksum, withBlockChecksum, withBlockDependency, BlockLZ4CompressorOutputStream.createParameterBuilder().build()); }