From owner-freebsd-hackers Tue Mar 21 22:32:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 7374637C0D4 for ; Tue, 21 Mar 2000 22:32:33 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id HAA29641; Wed, 22 Mar 2000 07:32:04 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Nick Sayer Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: md_image compression? In-reply-to: Your message of "Tue, 21 Mar 2000 21:55:39 PST." <200003220555.VAA56886@yoda.sftw.com> Date: Wed, 22 Mar 2000 07:32:04 +0100 Message-ID: <29639.953706724@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200003220555.VAA56886@yoda.sftw.com>, Nick Sayer writes: > >I'm sort of thinking in my head about adding the ability for the >md driver to handle gziped images. md's drvinit() looks like >the perfect place to do this. if strcmp(type,"md_image_gzip") then >gunzip the image and so on. > >Obviously this trades RAM for disk space. The target implementation >is the i-opener -> X terminal transmogrification. I think I can cram >the whole thing into the 16M flash card, and with compression of that >image, I can cram a lot more. To implement it, I have some questions: > >1. Is there a way to de-allocate or otherwise reuse the original >compressed image after the unzip is finished? currently not. >2. What is the best strategy for allocating the output image? >malloc(9)? Use the code already in MD which recognizes empty sectors, that will give you a little bit of compression. >3. This would effectively add libz to the kernel. We actually already have a unzip'er available in the kernel, the one which was used for unzip'ing a.out executables. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message