From: Evan Nemerson Date: Sun, 20 Jun 2010 19:31:26 +0000 (-0700) Subject: zlib: add crc32 and adler32 to ZLib.Utility X-Git-Tag: 0.9.3~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a69be6ff2a02d1c1fb9f191c2c0dfd86dcfd3eef;p=thirdparty%2Fvala.git zlib: add crc32 and adler32 to ZLib.Utility Fixes bug 622200. --- diff --git a/vapi/zlib.vapi b/vapi/zlib.vapi index dcd292aae..d27555b0e 100644 --- a/vapi/zlib.vapi +++ b/vapi/zlib.vapi @@ -141,12 +141,15 @@ namespace ZLib { public int prime (int bits, int value); public int get_header (out GZHeader head); } + [CCode (lower_case_cprefix = "")] namespace Utility { [CCode (cname = "compress2")] public static int compress ([CCode (array_length_type = "gulong")] uchar[] dest, [CCode (array_length_type = "gulong")] uchar[] source, int level = Level.DEFAULT_COMPRESSION); [CCode (cname = "compressBound")] public static int compress_bound (ulong sourceLen); public static int uncompress ([CCode (array_length_type = "gulong")] uchar[] dest, [CCode (array_length_type = "gulong")] uchar[] source); + public static ulong adler32 (ulong crc = 0, [CCode (array_length_type = "guint")] uint8[]? buf = null); + public static ulong crc32 (ulong crc = 0, [CCode (array_length_type = "guint")] uint8[]? buf = null); } [CCode (cname = "gz_header")] public struct GZHeader {