Beispiel #1
0
 // Token: 0x06000004 RID: 4 RVA: 0x000020A5 File Offset: 0x000002A5
 public CompressionOptions(byte[] dict, int compressionLevel = 3) : this(compressionLevel)
 {
     this.Dictionary = dict;
     if (dict != null)
     {
         this.Cdict = ExternMethods.ZSTD_createCDict(dict, (UIntPtr)((ulong)((long)dict.Length)), compressionLevel).EnsureZstdSuccess();
         return;
     }
     GC.SuppressFinalize(this);
 }
Beispiel #2
0
        public Compressor(byte[] dict = null, int compressionLevel = DefaultCompressionLevel)
        {
            CompressionLevel = compressionLevel;
            Dictionary       = dict;

            cctx = ExternMethods.ZSTD_createCCtx().EnsureZstdSuccess();
            if (dict != null)
            {
                cdict = ExternMethods.ZSTD_createCDict(dict, (size_t)dict.Length, compressionLevel).EnsureZstdSuccess();
            }
        }
Beispiel #3
0
        public CompressionOptions(byte[] dict, int compressionLevel = DefaultCompressionLevel)
            : this(compressionLevel)
        {
            Dictionary = dict;

            if (dict != null)
            {
                Cdict = ExternMethods.ZSTD_createCDict(dict, (size_t)dict.Length, compressionLevel).EnsureZstdSuccess();
            }
            else
            {
                GC.SuppressFinalize(this);                 // No unmanaged resources
            }
        }