version 1.15, 2000/12/12 16:23:27 |
version 1.16, 2001/11/19 19:02:13 |
|
|
void setfile __P((char *, struct stat *)); |
void setfile __P((char *, struct stat *)); |
void usage __P((void)); |
void usage __P((void)); |
int compress |
int compress |
__P((const char *, const char *, register struct compressor *, int)); |
__P((const char *, const char *, struct compressor *, int)); |
int decompress |
int decompress |
__P((const char *, const char *, register struct compressor *, int)); |
__P((const char *, const char *, struct compressor *, int)); |
struct compressor *check_method __P((int, const char *)); |
struct compressor *check_method __P((int, const char *)); |
|
|
struct stat sb, osb; |
struct stat sb, osb; |
|
|
compress(in, out, method, bits) |
compress(in, out, method, bits) |
const char *in; |
const char *in; |
const char *out; |
const char *out; |
register struct compressor *method; |
struct compressor *method; |
int bits; |
int bits; |
{ |
{ |
register int ifd; |
int ifd; |
int ofd; |
int ofd; |
register void *cookie; |
void *cookie; |
register ssize_t nr; |
ssize_t nr; |
u_char buf[Z_BUFSIZE]; |
u_char buf[Z_BUFSIZE]; |
int error; |
int error; |
|
|
|
|
int fd; |
int fd; |
const char *out; |
const char *out; |
{ |
{ |
register struct compressor *method; |
struct compressor *method; |
|
|
for (method = &c_table[0]; |
for (method = &c_table[0]; |
method->name != NULL && |
method->name != NULL && |
|
|
decompress(in, out, method, bits) |
decompress(in, out, method, bits) |
const char *in; |
const char *in; |
const char *out; |
const char *out; |
register struct compressor *method; |
struct compressor *method; |
int bits; |
int bits; |
{ |
{ |
int ifd; |
int ifd; |
register int ofd; |
int ofd; |
register void *cookie; |
void *cookie; |
register ssize_t nr; |
ssize_t nr; |
u_char buf[Z_BUFSIZE]; |
u_char buf[Z_BUFSIZE]; |
int error; |
int error; |
|
|
|
|
void |
void |
setfile(name, fs) |
setfile(name, fs) |
char *name; |
char *name; |
register struct stat *fs; |
struct stat *fs; |
{ |
{ |
static struct timeval tv[2]; |
static struct timeval tv[2]; |
|
|