2016-10-30 18:24:19 +01:00
|
|
|
#include <bzlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2024-04-14 22:45:38 +02:00
|
|
|
int main(void)
|
2016-10-30 18:24:19 +01:00
|
|
|
{
|
|
|
|
int chunksize = 1024;
|
|
|
|
FILE* file = fopen("test.bzip2", "wb");
|
|
|
|
char* buf = malloc(sizeof(char) * chunksize);
|
|
|
|
int error, rsize;
|
|
|
|
unsigned int in, out;
|
|
|
|
BZFILE* bzfile = BZ2_bzWriteOpen(&error, file, 64, 1, 10);
|
|
|
|
|
|
|
|
/* Don't actually write anything for the purposes of the test */
|
|
|
|
|
|
|
|
BZ2_bzWriteClose(&error, bzfile, 1, &in, &out);
|
|
|
|
free(buf);
|
|
|
|
fclose(file);
|
|
|
|
|
|
|
|
remove("test.bzip2");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|