]> arthur.barton.de Git - bup.git/blob - lib/bup/bupsplit.h
get: adjust for python 3 and test there
[bup.git] / lib / bup / bupsplit.h
1 /*
2  * Copyright 2011 Avery Pennarun. All rights reserved.
3  * 
4  * (This license applies to bupsplit.c and bupsplit.h only.)
5  * 
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  * 
10  *    1. Redistributions of source code must retain the above copyright
11  *       notice, this list of conditions and the following disclaimer.
12  * 
13  *    2. Redistributions in binary form must reproduce the above copyright
14  *       notice, this list of conditions and the following disclaimer in
15  *       the documentation and/or other materials provided with the
16  *       distribution.
17  * 
18  * THIS SOFTWARE IS PROVIDED BY AVERY PENNARUN AND CONTRIBUTORS ``AS
19  * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22  * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29  * OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 #ifndef __BUPSPLIT_H
32 #define __BUPSPLIT_H
33
34 #define BUP_BLOBBITS (13)
35 #define BUP_BLOBSIZE (1<<BUP_BLOBBITS)
36 #define BUP_WINDOWBITS (6)
37 #define BUP_WINDOWSIZE (1<<BUP_WINDOWBITS)
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42     
43 int bupsplit_find_ofs(const unsigned char *buf, int len, int *bits);
44 int bupsplit_selftest(void);
45
46 #ifdef __cplusplus
47 }
48 #endif
49     
50 #endif /* __BUPSPLIT_H */