Java Code Examples for net.jpountz.lz4.LZ4Factory#safeInstance()

The following examples show how to use net.jpountz.lz4.LZ4Factory#safeInstance() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Lz4Decompressor.java    From datacollector with Apache License 2.0 4 votes vote down vote up
public Lz4Decompressor(boolean unsafe, int bufferSize) {
  super(bufferSize);
  LZ4Factory factory = (unsafe) ? LZ4Factory.unsafeInstance() : LZ4Factory.safeInstance();
  decompressor = factory.safeDecompressor();
}
 
Example 2
Source File: Lz4Compressor.java    From datacollector with Apache License 2.0 4 votes vote down vote up
public Lz4Compressor(boolean unsafe, int bufferSize, boolean useHC) {
  super(bufferSize);
  LZ4Factory factory = (unsafe) ? LZ4Factory.unsafeInstance() : LZ4Factory.safeInstance();
  compressor = (useHC) ? factory.highCompressor() : factory.fastCompressor();
}