Re: GConverter commited

On Mon, 2009-11-23 at 21:57 -0600, Shaun McCance wrote:

> I'll be using the bzip2 and lzma converters in Yelp.  I'm not
> sure about the magic converter.  I might just throw it away and
> go off the file name.  The magic detection is not suitable for
> general use, though I think it's OKish for Yelp.  Although this
> Debian bug report concerns me:

lzma is detected by shared-mime-info (i.e GContentType), but only if it
has the right extension. Extending the database with magic info
shouldn't be that hard though.

> Also, when putting together chains of streams when content may
> or may not be encoded, I think it would be useful to have some
> sort of NullConverter, i.e. a GConverter that doesn't change
> anything.  Would anybody else find that useful?

I'm not sure why you'd need this, you just don't add a
GConverterInputStream in that case.

> Anyway, since I was one of the people wanting this, I thought
> I'd share my first experiences with it.  I'm curious what other
> people would like to do about GConverters for other compression
> schemes.  The code is simple enough that I don't really mind
> keeping it in Yelp.  But if other people are doing this stuff,
> maybe we should talk about how to share code.

Yeah, sharing things like this is good, but we don't want every app to
link to these libraries, and even gio plugins are not free (even when
not used) since we load them once to see what extension points they

Its not a lot of code either, nor is it very complicated, so maybe cut
and paste is not such a horrible idea.

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