public void Finalize(ReadOnlySpan <byte> contents, SamplerDelegate sampler, ref DictionaryParameters parameters)
        {
            var samplesBuffer = GatherSamples(sampler, out var samplesSizes);

            Size = Native.ZDict.Finalize(
                Data,
                contents,
                samplesBuffer,
                (ReadOnlySpan <UIntPtr>)samplesSizes,
                ref parameters
                )
                   .EnsureZDictSuccess();
        }
Beispiel #2
0
 public static UIntPtr Finalize(Span <byte> dictionary, ReadOnlySpan <byte> dictContent, ReadOnlySpan <byte> samples, ReadOnlySpan <UIntPtr> samplesSizes, ref DictionaryParameters parameters) {
     fixed(byte *pDictBuffer = dictionary)
     fixed(byte *pDictContent                 = dictContent)
     fixed(byte *pSamplesBuffer               = samples)
     fixed(UIntPtr * pSamplesSizes            = samplesSizes)
     fixed(DictionaryParameters * pParameters = &parameters)
     return(Finalize(pDictBuffer, (UIntPtr)dictionary.Length, pDictContent, (UIntPtr)dictContent.Length,
                     pSamplesBuffer, pSamplesSizes, (uint)samplesSizes.Length, pParameters));
 }