2 * add a file/files to an sqlite db
3 * in the 'files' table.
19 void *compresslzma(void *buf, size_t bufsize, size_t *len) {
25 outsize = lzma_stream_buffer_bound(bufsize);
26 outbuf = malloc(outsize);
31 /* TODO adjust encoding level for size */
32 lzma_easy_buffer_encode(6, LZMA_CHECK_CRC64, NULL,
34 outbuf, &outlen, outsize
40 static int callback(void *NotUsed, int argc, char **argv, char **azColName){
42 for(i=0; i<argc; i++){
43 printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
49 static char *create_table = "create table if not exists files (hash text primary key, size integer, compression text, content blob)";