示例#1
0
            public static UIntPtr StreamCompress(CCtx *ctx, ref ArraySegment <byte> output, ref ArraySegment <byte> input, EndDirective endOp)
            {
                UIntPtr result = default;

                Buffer.WithArraySegmentPair(ref output, ref input, (ref Buffer outBuf, ref Buffer inBuf) => {
                    result = StreamCompress(ctx, ref outBuf, ref inBuf, endOp);
                });

                return(result);
            }
示例#2
0
 public static UIntPtr StreamCompress(CCtx *ctx, byte *dst, UIntPtr dstCapacity, UIntPtr *dstPos, byte *src, UIntPtr srcSize, UIntPtr *srcPos, EndDirective endOp)
 {
     IL.Push(ctx);
     IL.Push(dst);
     IL.Push(dstCapacity);
     IL.Push(dstPos);
     IL.Push(src);
     IL.Push(srcSize);
     IL.Push(srcPos);
     IL.Push(endOp);
     IL.Push(ZSTD_compressStream2_simpleArgs);
     IL.Emit.Tail();
     IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(UIntPtr),
                                           typeof(CCtx *),
                                           typeof(byte *), typeof(UIntPtr), typeof(UIntPtr *),
                                           typeof(byte *), typeof(UIntPtr), typeof(UIntPtr *),
                                           typeof(EndDirective)));
     return(IL.Return <UIntPtr>());
 }
示例#3
0
 public static UIntPtr StreamCompress(CCtx *ctx, ref Buffer output, ref Buffer input, EndDirective endOp)
 {
     fixed(Buffer *pOutput = &output)
     fixed(Buffer * pInput = &input)
     {
         return(StreamCompress(
                    ctx,
                    pOutput,
                    pInput,
                    endOp
                    ));
     }
 }
示例#4
0
 public static UIntPtr StreamCompress(CCtx *ctx, Buffer *output, Buffer *input, EndDirective endOp)
 {
     IL.Push(ctx);
     IL.Push(output);
     IL.Push(input);
     IL.Push(endOp);
     IL.Push(ZSTD_compressStream2);
     IL.Emit.Tail();
     IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(UIntPtr),
                                           typeof(CCtx *), typeof(Buffer *), typeof(Buffer *), typeof(EndDirective)));
     return(IL.Return <UIntPtr>());
 }