Thread View: net.bugs.v7
1 messages
1 total messages
Started by Guy Harris
Tue, 03 Sep 1985 08:26
Code to identify "compress"ed files for "file"
Author: Guy Harris
Date: Tue, 03 Sep 1985 08:26
Date: Tue, 03 Sep 1985 08:26
15 lines
1060 bytes
1060 bytes
Here's some code to add into "file.c" somewhere before it starts scrabbling
around looking for C/FORTRAN/assembler-language keywords:
if (buf[0] == '\037' && buf[1] == '\235') {
printf("compressed data, ");
if (buf[2]&0x80)
printf("block compressed, ");
printf("%d bits\n", buf[2]&0x1f);
goto out;
}
If you have "compress" on your system, this will recognize compressed files
and dump some extra information about them.
Guy Harris
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads