コード例 #1
0
 /// <summary>
 /// Performs a lazy initialization of the native encoder using the default Quality and Window values:
 /// BROTLI_DEFAULT_WINDOW 22
 /// BROTLI_DEFAULT_QUALITY 11
 /// </summary>
 internal void InitializeEncoder()
 {
     EnsureNotDisposed();
     _state = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
     if (_state.IsInvalid)
     {
         throw new IOException(SR.BrotliEncoder_Create);
     }
 }
コード例 #2
0
 public BrotliEncoder(int quality, int window)
 {
     _disposed = false;
     _state    = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
     if (_state.IsInvalid)
     {
         throw new IOException(SR.BrotliEncoder_Create);
     }
     SetQuality(quality);
     SetWindow(window);
 }
コード例 #3
0
ファイル: Interop.Brotli.cs プロジェクト: z77ma/runtime
 internal static partial BOOL BrotliEncoderHasMoreOutput(SafeBrotliEncoderHandle state);
コード例 #4
0
ファイル: Interop.Brotli.cs プロジェクト: z77ma/runtime
 internal static unsafe partial BOOL BrotliEncoderCompressStream(
     SafeBrotliEncoderHandle state, BrotliEncoderOperation op, ref nuint availableIn,
     byte **nextIn, ref nuint availableOut, byte **nextOut, out nuint totalOut);
コード例 #5
0
ファイル: Interop.Brotli.cs プロジェクト: z77ma/runtime
 internal static partial BOOL BrotliEncoderSetParameter(SafeBrotliEncoderHandle state, BrotliEncoderParameter parameter, uint value);
コード例 #6
0
 internal static extern bool BrotliEncoderHasMoreOutput(SafeBrotliEncoderHandle state);
コード例 #7
0
 internal static extern unsafe bool BrotliEncoderCompressStream(
     SafeBrotliEncoderHandle state, BrotliEncoderOperation op, ref size_t availableIn,
     byte **nextIn, ref size_t availableOut, byte **nextOut, out size_t totalOut);
コード例 #8
0
 internal static extern bool BrotliEncoderSetParameter(SafeBrotliEncoderHandle state, BrotliEncoderParameter parameter, UInt32 value);
コード例 #9
0
ファイル: BrotliStubs.cs プロジェクト: zzwwqqq/mono
 internal static bool BrotliEncoderHasMoreOutput(SafeBrotliEncoderHandle state) =>
 throw new PlatformNotSupportedException();
コード例 #10
0
ファイル: BrotliStubs.cs プロジェクト: zzwwqqq/mono
 internal static unsafe bool BrotliEncoderCompressStream(
     SafeBrotliEncoderHandle state, BrotliEncoderOperation op, ref size_t availableIn,
     byte **nextIn, ref size_t availableOut, byte **nextOut, out size_t totalOut) =>
 throw new PlatformNotSupportedException();
コード例 #11
0
ファイル: BrotliStubs.cs プロジェクト: zzwwqqq/mono
 internal static bool BrotliEncoderSetParameter(SafeBrotliEncoderHandle state, BrotliEncoderParameter parameter, UInt32 value) =>
 throw new PlatformNotSupportedException();