Package net.jpountz.lz4

Examples of net.jpountz.lz4.LZ4Factory

Only the {@link #safeInstance() safe instance} is guaranteed to work on yourJVM, as a consequence it is advised to use the {@link #fastestInstance()} or{@link #fastestJavaInstance()} to pull a {@link LZ4Factory} instance.

All methods from this class are very costly, so you should get an instance once, and then reuse it whenever possible. This is typically done by storing a {@link LZ4Factory} instance in a static field.


    int compressedLength2 = decompressor.decompress(compressed, 0, restored, 0, decompressedLength);
    // compressedLength == compressedLength2

    // - method 2: when the compressed length is known (a little slower)
    // the destination buffer needs to be over-sized
    LZ4SafeDecompressor decompressor2 = factory.safeDecompressor();
    int decompressedLength2 = decompressor2.decompress(compressed, 0, compressedLength, restored, 0);
    // decompressedLength == decompressedLength2
  }
View Full Code Here

TOP

Related Classes of net.jpountz.lz4.LZ4Factory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.