Example #1
0
 /// <summary>Encodes the specified input.</summary>
 /// <param name="input">The input.</param>
 /// <param name="inputOffset">The input offset.</param>
 /// <param name="inputLength">Length of the input.</param>
 /// <param name="output">The output.</param>
 /// <param name="outputOffset">The output offset.</param>
 /// <param name="outputLength">Length of the output.</param>
 /// <returns>Number of bytes written.</returns>
 public static int Encode(
     byte[] input,
     int inputOffset,
     int inputLength,
     byte[] output,
     int outputOffset,
     int outputLength)
 {
     return(Lz4CodecEncodeFunctions.Encode(input, inputOffset, inputLength, output, outputOffset, outputLength));
 }
Example #2
0
 /// <summary>Decodes the specified input.</summary>
 /// <param name="input">The input.</param>
 /// <param name="inputOffset">The input offset.</param>
 /// <param name="inputLength">Length of the input.</param>
 /// <param name="output">The output.</param>
 /// <param name="outputOffset">The output offset.</param>
 /// <param name="outputLength">Length of the output.</param>
 /// <param name="knownOutputLength">Set it to <c>true</c> if output length is known.</param>
 /// <returns>Number of bytes written.</returns>
 public static int Decode(
     byte[] input,
     int inputOffset,
     int inputLength,
     byte[] output,
     int outputOffset,
     int outputLength       = 0,
     bool knownOutputLength = false)
 {
     return(Lz4CodecEncodeFunctions.Decode(input, inputOffset, inputLength, output, outputOffset, outputLength, knownOutputLength));
 }
Example #3
0
 /// <summary>
 /// Returns maximum length of compressed data.
 /// </summary>
 public static int CompressBound(int sourceSize)
 {
     return(Lz4CodecEncodeFunctions.CompressBound(sourceSize));
 }
Example #4
0
 /// <summary>Encodes the specified input.</summary>
 /// <param name="input">The input.</param>
 /// <param name="inputOffset">The input offset.</param>
 /// <param name="inputLength">Length of the input.</param>
 /// <returns>Compressed buffer.</returns>
 public static byte[] Encode(byte[] input, int inputOffset, int inputLength)
 {
     return(Lz4CodecEncodeFunctions.Encode(input, inputOffset, inputLength));
 }