Beispiel #1
0
        /// <summary>
        /// Creates a new <see cref="StreamDecodeContextHandle"/> from a <see cref="IntPtr"/>.
        /// </summary>
        /// <param name="unsafeHandle">
        /// The underlying <see cref="IntPtr"/>
        /// </param>
        /// <param name="ownsHandle">
        /// <see langword="true"/> to reliably release the handle during the finalization phase; <see langword="false"/> to prevent reliable release (not recommended).
        /// </param>
        /// <returns>
        /// </returns>
        public static StreamDecodeContextHandle DangerousCreate(IntPtr unsafeHandle, bool ownsHandle)
        {
            StreamDecodeContextHandle safeHandle = new StreamDecodeContextHandle(ownsHandle);

            safeHandle.SetHandle(unsafeHandle);
            return(safeHandle);
        }
Beispiel #2
0
 /// <summary>
 /// Creates a new <see cref="StreamDecodeContextHandle"/> from a <see cref="IntPtr"/>.
 /// </summary>
 /// <param name="unsafeHandle">
 /// The underlying <see cref="IntPtr"/>
 /// </param>
 /// <returns>
 /// </returns>
 public static StreamDecodeContextHandle DangerousCreate(IntPtr unsafeHandle)
 {
     return(StreamDecodeContextHandle.DangerousCreate(unsafeHandle, true));
 }
Beispiel #3
0
 public static extern int LZ4_decompress_safe_continue(StreamDecodeContextHandle LZ4_streamDecode, byte *src, byte *dst, int srcSize, int dstCapacity);
Beispiel #4
0
 public static extern int LZ4_setStreamDecode(StreamDecodeContextHandle LZ4_streamDecode, byte *dictionary, int dictSize);