@ -53,3 +53,17 @@ bitmap_compare(const unsigned char *a,
return cnt;
}
int
bitmap_diffmap(const unsigned char *diff,
const unsigned char *a,
const unsigned char *b)
{
size_t i = 0;
for (i = 0; i < BITMAP_SIZE; i++, a++, b++, diff++) {
*diff = *a ^ *b;
return i;
@ -1,4 +1,5 @@
#ifndef HAS_BITMAP_H
#define HAS_BITMAP_H 1
#define BITMAP_SIZE 32
#define BITMAP_BITS 256
@ -9,5 +10,8 @@ int
bitmap_compare(const unsigned char *a,
const unsigned char *b);
#endif