[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Transparent decompression with file system filter

From: Bean
Subject: Transparent decompression with file system filter
Date: Sat, 4 Aug 2007 00:06:28 +0800

Currently, grub2 support gziped file with the gzio module. To open a
gziped file,
you have to use a special function grub_gzfile_open, I think it could
be better if
grub_file_open could handle compressed file transparently.

The implementation is actually quite simple. We define a file system
filter interface,
modules can use it to register its filter. Then, as the last step of
opening a file, we
can the filters. If a filter recognized the file format, it will
create a new file object
to represent the file. If none of the filter want to handle this file,
the orginal file
object is used.

We can add a new function grub_file_rawopen, which will always skip
the filters. We can
also use variable to control behavior, for example, if nocomp=1, no
filter is called.

The advantage of this scheme is that it's extensible. For example. if
we want to support
bzip2 format, we just need to add a new decompression filter.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]