diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-16 22:40:59 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-16 22:40:59 +0000 |
commit | 3b759548496abdc3b975d6a17fa3650b8df3e1ec (patch) | |
tree | 749e502ec394ada600dc82f5fa36ff7707c0ecd2 /distrib/special/gzip/compress.c | |
parent | 1cc43490681263089ee601bd6579ea970c6b5065 (diff) |
space saver for the boot floppies:
on the install media, gzip only need to decompress, but never to compress.
so leave the (gz-)compress code out.
don't link libz but compile the needed parts in.
use an older much smaller crc32.c version and a cut down compress.c
tested by nick@
ok deraadt@
Diffstat (limited to 'distrib/special/gzip/compress.c')
-rw-r--r-- | distrib/special/gzip/compress.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/distrib/special/gzip/compress.c b/distrib/special/gzip/compress.c new file mode 100644 index 00000000000..99b7fb091db --- /dev/null +++ b/distrib/special/gzip/compress.c @@ -0,0 +1,15 @@ +/* $OpenBSD: compress.c,v 1.1 2003/12/16 22:40:58 henning Exp $ */ +/* compress.c -- compress a memory buffer + * Copyright (C) 1995-2002 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + + +#define ZLIB_INTERNAL +#include "zlib.h" + +uLong ZEXPORT compressBound (sourceLen) + uLong sourceLen; +{ + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; +} |