]> arthur.barton.de Git - bup.git/blob - lib/bup/bupsplit.h
14c80abc4221c150f016d72dea29f2595c7e41a5
[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 ``AS IS'' AND ANY
19  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
22  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 #ifndef __BUPSPLIT_H
31 #define __BUPSPLIT_H
32
33 #define BUP_BLOBBITS (13)
34 #define BUP_BLOBSIZE (1<<BUP_BLOBBITS)
35 #define BUP_WINDOWBITS (6)
36 #define BUP_WINDOWSIZE (1<<BUP_WINDOWBITS)
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41     
42 int bupsplit_find_ofs(const unsigned char *buf, int len, int *bits);
43 int bupsplit_selftest(void);
44
45 #ifdef __cplusplus
46 }
47 #endif
48     
49 #endif /* __BUPSPLIT_H */