Пример #1
0
        public void CheckLibrary_ValidLibrary_NoExceptionThrown()
        {
            var ex = Record.Exception(() =>
            {
                LibraryUtilities.CheckLibrary();
            });

            Assert.Null(ex);
        }
Пример #2
0
        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
 /// <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
 /// <summary>
 /// constructor
 /// </summary>
 public QuickLZ()
 {
     LibraryUtilities.CheckLibrary();
 }