All of lore.kernel.org
 help / color / mirror / Atom feed
* DEFLATE compression
@ 2008-06-23 13:36 Colin D Bennett
  2008-06-23 14:15 ` Bean
  0 siblings, 1 reply; 6+ messages in thread
From: Colin D Bennett @ 2008-06-23 13:36 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

How does GRUB support decompressing DEFLATE compressed data?  Based on
my reading of io/gzio.c, it looks like a gzip header is required to
inflate deflated data.

I am implementing a new font format and will be embedding multiple
blocks of compressed bitmaps in the font file for a good combination of
space efficient on-disk storage and fast read performance during use.
A block of character bitmaps will only be read from the file
and decompressed at run time when a character within that block is
needed. After that, when any character in the block is needed, it is
already decompressed in memory for quick access.

I was going to use DEFLATE compression, it looks like I may have to add
the gzip structure to it, which seems silly since it's just a block of
data within my file. 

Also, is it possible to tell the gzio module to decompress a block of
data beginning at a specific offset in the file?

Regards,
Colin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DEFLATE compression
  2008-06-23 13:36 DEFLATE compression Colin D Bennett
@ 2008-06-23 14:15 ` Bean
  2008-06-23 15:14   ` Vesa Jääskeläinen
  0 siblings, 1 reply; 6+ messages in thread
From: Bean @ 2008-06-23 14:15 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Jun 23, 2008 at 9:36 PM, Colin D Bennett <colin@gibibit.com> wrote:
> How does GRUB support decompressing DEFLATE compressed data?  Based on
> my reading of io/gzio.c, it looks like a gzip header is required to
> inflate deflated data.
>
> I am implementing a new font format and will be embedding multiple
> blocks of compressed bitmaps in the font file for a good combination of
> space efficient on-disk storage and fast read performance during use.
> A block of character bitmaps will only be read from the file
> and decompressed at run time when a character within that block is
> needed. After that, when any character in the block is needed, it is
> already decompressed in memory for quick access.
>
> I was going to use DEFLATE compression, it looks like I may have to add
> the gzip structure to it, which seems silly since it's just a block of
> data within my file.
>
> Also, is it possible to tell the gzio module to decompress a block of
> data beginning at a specific offset in the file?

Hi,

I think it's better to move the deflate decompression function into a
separate module, instead of relying on gzio. I have written similar
deflate function for pnp.c, but it uses callback mode, which call a
function to retrieve the next character. It'd be nice to unify all
deflate decompression in one module, but you need to be careful about
the interface, so that it can be used in both situation (direct and
callback mode).

-- 
Bean



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DEFLATE compression
  2008-06-23 14:15 ` Bean
@ 2008-06-23 15:14   ` Vesa Jääskeläinen
  2008-06-23 15:25     ` Bean
  0 siblings, 1 reply; 6+ messages in thread
From: Vesa Jääskeläinen @ 2008-06-23 15:14 UTC (permalink / raw)
  To: The development of GRUB 2

Bean wrote:
> On Mon, Jun 23, 2008 at 9:36 PM, Colin D Bennett <colin@gibibit.com> wrote:
>> How does GRUB support decompressing DEFLATE compressed data?  Based on
>> my reading of io/gzio.c, it looks like a gzip header is required to
>> inflate deflated data.
>>
>> I am implementing a new font format and will be embedding multiple
>> blocks of compressed bitmaps in the font file for a good combination of
>> space efficient on-disk storage and fast read performance during use.
>> A block of character bitmaps will only be read from the file
>> and decompressed at run time when a character within that block is
>> needed. After that, when any character in the block is needed, it is
>> already decompressed in memory for quick access.
>>
>> I was going to use DEFLATE compression, it looks like I may have to add
>> the gzip structure to it, which seems silly since it's just a block of
>> data within my file.
>>
>> Also, is it possible to tell the gzio module to decompress a block of
>> data beginning at a specific offset in the file?
> 
> Hi,
> 
> I think it's better to move the deflate decompression function into a
> separate module, instead of relying on gzio. I have written similar
> deflate function for pnp.c, but it uses callback mode, which call a
> function to retrieve the next character. It'd be nice to unify all
> deflate decompression in one module, but you need to be careful about
> the interface, so that it can be used in both situation (direct and
> callback mode).

Hi Bean,

Can you check the interface as you have previously worked with it? This 
would free Colin to work on more important aspects.

Thanks,
Vesa Jääskeläinen




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DEFLATE compression
  2008-06-23 15:14   ` Vesa Jääskeläinen
@ 2008-06-23 15:25     ` Bean
  2008-06-23 15:28       ` Vesa Jääskeläinen
  2008-06-23 15:36       ` Colin D Bennett
  0 siblings, 2 replies; 6+ messages in thread
From: Bean @ 2008-06-23 15:25 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Jun 23, 2008 at 11:14 PM, Vesa Jääskeläinen <chaac@nic.fi> wrote:
> Hi Bean,
>
> Can you check the interface as you have previously worked with it? This
> would free Colin to work on more important aspects.

Hi,

Ok. But I have other things to fix at the moment, is this urgent ?

-- 
Bean



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DEFLATE compression
  2008-06-23 15:25     ` Bean
@ 2008-06-23 15:28       ` Vesa Jääskeläinen
  2008-06-23 15:36       ` Colin D Bennett
  1 sibling, 0 replies; 6+ messages in thread
From: Vesa Jääskeläinen @ 2008-06-23 15:28 UTC (permalink / raw)
  To: The development of GRUB 2

Bean wrote:
> On Mon, Jun 23, 2008 at 11:14 PM, Vesa Jääskeläinen <chaac@nic.fi> wrote:
>> Hi Bean,
>>
>> Can you check the interface as you have previously worked with it? This
>> would free Colin to work on more important aspects.
> 
> Hi,
> 
> Ok. But I have other things to fix at the moment, is this urgent ?
> 

Nope. Take your time. Uncompressed format is Ok for now, but later it 
should be compressed.

Thanks,
Vesa Jääskeläinen



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DEFLATE compression
  2008-06-23 15:25     ` Bean
  2008-06-23 15:28       ` Vesa Jääskeläinen
@ 2008-06-23 15:36       ` Colin D Bennett
  1 sibling, 0 replies; 6+ messages in thread
From: Colin D Bennett @ 2008-06-23 15:36 UTC (permalink / raw)
  To: grub-devel

On Mon, 23 Jun 2008 23:25:13 +0800
Bean <bean123ch@gmail.com> wrote:

> On Mon, Jun 23, 2008 at 11:14 PM, Vesa Jääskeläinen <chaac@nic.fi>
> wrote:
> > Hi Bean,
> >
> > Can you check the interface as you have previously worked with it?
> > This would free Colin to work on more important aspects.
> 
> Hi,
> 
> Ok. But I have other things to fix at the moment, is this urgent ?

It is not urgent.  I will defer implementing font compression until a
later date, as it is not critical to the design or functionality: it is
merely a nice optimization.

Thanks,
Colin



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-23 15:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23 13:36 DEFLATE compression Colin D Bennett
2008-06-23 14:15 ` Bean
2008-06-23 15:14   ` Vesa Jääskeläinen
2008-06-23 15:25     ` Bean
2008-06-23 15:28       ` Vesa Jääskeläinen
2008-06-23 15:36       ` Colin D Bennett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.