FT_Gzip_Uncompress() private method

private FT_Gzip_Uncompress ( IntPtr memory, IntPtr output, IntPtr &output_len, IntPtr input, IntPtr input_len ) : System.Error
memory System.IntPtr
output System.IntPtr
output_len System.IntPtr
input System.IntPtr
input_len System.IntPtr
return System.Error
示例#1
0
        /// <summary>
        /// Decompress a zipped input buffer into an output buffer. This function is modeled after zlib's ‘uncompress’
        /// function.
        /// </summary>
        /// <remarks>
        /// This function may return <see cref="Error.UnimplementedFeature"/> if your build of FreeType was not
        /// compiled with zlib support.
        /// </remarks>
        /// <param name="input">The input buffer.</param>
        /// <param name="output">The output buffer.</param>
        /// <returns>The length of the used data in output.</returns>
        public unsafe int GzipUncompress(byte[] input, byte[] output)
        {
            IntPtr len = (IntPtr)output.Length;

            fixed(byte *inPtr = input, outPtr = output)
            {
                Error err = FT.FT_Gzip_Uncompress(Reference, (IntPtr)outPtr, ref len, (IntPtr)inPtr, (IntPtr)input.Length);

                if (err != Error.Ok)
                {
                    throw new FreeTypeException(err);
                }
            }

            return((int)len);
        }