glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] Compressed maps - idea


From: Stephane Magnenat
Subject: Re: [glob2-devel] Compressed maps - idea
Date: Tue, 8 Feb 2005 21:55:08 +0100
User-agent: KMail/1.7.2

Hi,

> I was just looking over the roadmap, and I was thinking a bit about the
> compressed map thing. I looked into zlib a bit, and I think it would be
> rather easy to just gzip the maps, and read them in through zlib, that
> would require a minimum of change to the glob2 code, and dramatically
> reduce the size of the maps.
>
> might this be an option? I think I can get it done rather quickly.

Yes. We already thought of it since a long time. In fact, I designed the new 
stream structure with this option in mind. The idea is to create a new 
StreamBackend class, called GzipStreamFilter, that takes a StreamBackend as 
an argument of its constructor, and compress and write or read and 
decompress. In its destructor, it could also delete the StreamBackend taken 
in the constructor, so that it is easy to do things like that:

Stream *myTextFile = new TextStream(new 
GzipStreamBackend(Toolkit::getFileManager()->openInputStreamBackend("toto.txt.gz")));
// some code
delete myTextFile;

I don't know if the zlib can accept read/write operations simultaneously, if 
not, a bool in the constructor indicating the read/write direction could be 
required.

What do you think ?

I'm at your disposal for further question answering/discussion on this.

Steph

-- 
http://nct.ysagoon.com




reply via email to

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