Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
index_free(zck);
if(zck->header)
free(zck->header);
- zck->fd = -1;
zck->header = NULL;
zck->header_size = 0;
if(!comp_close(zck))
close(zck->temp_fd);
zck->temp_fd = 0;
}
+ zck->fd = -1;
}
static int hex_to_int (char c) {
}
zck->prep_hash_type = -1;
zck->prep_hdr_size = -1;
+ zck->buzhash_width = DEFAULT_BUZHASH_WIDTH;
+ zck->buzhash_match_bits = (2^DEFAULT_BUZHASH_BITS) - 1;
return zck;
}
#define ZCK_MODE_READ 0
#define ZCK_MODE_WRITE 1
+#define DEFAULT_BUZHASH_WIDTH 48
+#define DEFAULT_BUZHASH_BITS 15
+
#define zmalloc(x) calloc(1, x)
#define PUBLIC __attribute__((visibility("default")))
char *data;
size_t data_size;
+
+ int buzhash_width;
+ int buzhash_match_bits;
} zckCtx;
int get_tmp_fd()