public void LowBitRandom() { fixed(byte *inputPtr = highRepeatRandomInput) fixed(byte *encodedOutputPtr = highRepeatEncodedOutput) fixed(byte *outputPtr = highRepeatRandomOutput) { int compressedSize = LZ4.Encode64(inputPtr, encodedOutputPtr, highRepeatRandomInput.Length, highRepeatEncodedOutput.Length); int uncompressedSize = LZ4.Decode64(encodedOutputPtr, compressedSize, outputPtr, highRepeatRandomInput.Length, true); } }
public void DecompressionBenchmark() { foreach (var tuple in _buffers) { fixed(byte *ptr = tuple.Item1) fixed(byte *buffer = _lz4Buffer) { LZ4.Decode64(ptr, tuple.Item1.Length, buffer, tuple.Item2, true); } } }