public static int Encode(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int outputLength) { if (IntPtr.Size == 4) { return(LZ4Codec.Encode32Unsafe(input, inputOffset, inputLength, output, outputOffset, outputLength)); } else { return(LZ4Codec.Encode64Unsafe(input, inputOffset, inputLength, output, outputOffset, outputLength)); } }
public static int Decode(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int outputLength, bool knownOutputLength) { if (IntPtr.Size == 4) { return(LZ4Codec.Decode32(input, inputOffset, inputLength, output, outputOffset, outputLength, knownOutputLength)); } else { return(LZ4Codec.Decode64(input, inputOffset, inputLength, output, outputOffset, outputLength, knownOutputLength)); } }