]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
zlib: add crc32 and adler32 to ZLib.Utility
authorEvan Nemerson <evan@coeus-group.com>
Sun, 20 Jun 2010 19:31:26 +0000 (12:31 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Sun, 20 Jun 2010 19:40:37 +0000 (12:40 -0700)
Fixes bug 622200.

vapi/zlib.vapi

index dcd292aae858d76c6d209e562f53c653f6718ef3..d27555b0ef5d5f77ee77e29a394a572a556563a2 100644 (file)
@@ -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 {