From owner-freebsd-small Fri Jun 30 2:18:42 2000 Delivered-To: freebsd-small@freebsd.org Received: from mailrouter1.strath.ac.uk (orkney.cc.strath.ac.uk [130.159.248.40]) by hub.freebsd.org (Postfix) with ESMTP id A651937C397 for ; Fri, 30 Jun 2000 02:18:34 -0700 (PDT) (envelope-from roger@cs.strath.ac.uk) Received: from [62.252.148.118] (helo=cs.strath.ac.uk) by mailrouter1.strath.ac.uk with esmtp (Exim 3.12 #2) id 137wvv-00071M-00 for small@freebsd.org; Fri, 30 Jun 2000 10:17:59 +0100 Message-ID: <395C6606.30675C5C@cs.strath.ac.uk> Date: Fri, 30 Jun 2000 10:19:02 +0100 From: Roger Hardiman Organization: Strathclyde University X-Mailer: Mozilla 4.51 [en] (X11; I; FreeBSD 4.0-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: small@freebsd.org Subject: bzip2 vrs gzip saves me 28k on my kernel size Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, Following on from my kernel size tests, I compressed the kernel image with bzip2 instead of gzip. Ok, bzip2 is not in the loader, but it made me think more about the compression we use. 1) The original kernels default optimise: gcc -O kernel is 1212593 bytes. size optimise: gcc -Os kernel is 1203761 bytes 2) The kernels compressed with gzip default optimise: kernel.gz is 551628 bytes size optimise: kernel.gz is 554033 bytes. 3) The kernels compressed with bzip2, from the Ports Tree default optimise: kernel.gz is 523435 bytes size optimise: kernel.gz is 522065 bytes SUCCESS We have 2 good results here. bzip2 gets the default kernel 27.5K SMALLER! ( 28193 bytes smaller ) And if we use the kernel optimised for size, we actually save another 1.3K (1370 bytes) BZIP2ed kernel So, we can save 28.8K here. Of course, I have not forgotten the space need for bzip2's decompressor. I'd hope we can put a bzip2's decompressor into the boot loader and take out the gunzip code at the same time, making a nice space saving. bzip2 has a BSD licence too, so we have no problems integrating it into PicoBSD. Any comments on this? Roger -- Roger Hardiman Strathclyde Uni Telepresence Research Group, Glasgow, Scotland. http://www.telepresence.strath.ac.uk 0141 548 2897 roger@cs.strath.ac.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message