bzip.c revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
#pragma prototyped
/*
*/
#include <codex.h>
#include <bzlib.h>
#include <ctype.h>
#define MINLEVEL 1
#define MAXLEVEL 9
#define X(x) #x
#define S(x) X(x)
typedef struct State_s
{
int level;
} State_t;
static int
{
unsigned char* h = (unsigned char*)head;
{
return 1;
}
return 0;
}
static int
{
const char* s;
char* e;
int i;
int v;
i = 2;
while (s = args[i++])
{
if (isdigit(*s))
else
{
e = (char*)s;
if (e[0] == 'n' && e[1] == 'o')
{
e += 2;
v = 0;
}
else
v = 1;
}
if (!*e)
{
{
(*p->disc->errorf)(NiL, p->disc, 2, "%s: compression level must be in [%d..%d]", s, MINLEVEL, MAXLEVEL);
return -1;
}
level = v;
}
else
{
return -1;
}
}
{
return -1;
}
{
return -1;
}
return 0;
}
static int
{
char* m;
char mode[8];
m = mode;
if (p->flags & CODEX_ENCODE)
*m++ = 'w';
else
*m++ = 'r';
*m++ = 'b';
*m++ = 'o';
*m = 0;
}
static int
{
int r;
return r;
}
static ssize_t
{
}
static ssize_t
{
}
{
"bzip",
"bzip2 compression. The first parameter is the compression level,"
0,
0,
0,
0,
0,
0,
0,
0,
};