コード例 #1
0
        public void CheckLibrary_ValidLibrary_NoExceptionThrown()
        {
            var ex = Record.Exception(() =>
            {
                LibraryUtilities.CheckLibrary();
            });

            Assert.Null(ex);
        }
コード例 #2
0
ファイル: ZstandardDict.cs プロジェクト: wangdi2014/Nirvana
        public ZstandardDict(int compressionLevel, byte[] dictBuffer)
        {
            LibraryUtilities.CheckLibrary();

            _compressDict      = SafeNativeMethods.ZSTD_createCDict(dictBuffer, (ulong)dictBuffer.Length, compressionLevel);
            _decompressDict    = SafeNativeMethods.ZSTD_createDDict(dictBuffer, (ulong)dictBuffer.Length);
            _compressContext   = SafeNativeMethods.ZSTD_createCCtx();
            _decompressContext = SafeNativeMethods.ZSTD_createDCtx();
        }
コード例 #3
0
ファイル: Zlib.cs プロジェクト: zhouhufeng/Nirvana
 /// <summary>
 /// constructor
 /// </summary>
 public Zlib(int compressionLevel = 1)
 {
     _compressionLevel = compressionLevel;
     LibraryUtilities.CheckLibrary();
 }
コード例 #4
0
 public Zstandard(int compressionLevel = 17)
 {
     _compressionLevel = compressionLevel;
     LibraryUtilities.CheckLibrary();
 }
コード例 #5
0
ファイル: QuickLZ.cs プロジェクト: zhouhufeng/Nirvana
 /// <summary>
 /// constructor
 /// </summary>
 public QuickLZ()
 {
     LibraryUtilities.CheckLibrary();
 }