Ejemplo n.º 1
0
        public static ulong ZSTD_compressStream(IntPtr zcs, NativeBufferInfo outputBuffer, NativeBufferInfo inputBuffer)
        {
            var result = __ZSTD_compressStream.Value(zcs, outputBuffer, inputBuffer);

            ThrowIfError(result);
            return(result);
        }
        // private methods
        private NativeBufferInfo CreateNativeBuffer(PinnedBufferWalker pinnedBufferWalker, ulong size)
        {
            var nativeBuffer = new NativeBufferInfo();

            nativeBuffer.DataPointer = pinnedBufferWalker?.IntPtr ?? IntPtr.Zero;
            nativeBuffer.Size        = size;
            nativeBuffer.Position    = 0;
            return(nativeBuffer);
        }