Re: GConverter commited

2009-11-25 Thread Behdad Esfahbod
On 11/24/2009 11:09 AM, Shaun McCance wrote: So with my implementation, by the time you get to the magic, you've already set up a GConverterInputStream with the magic decompressor. If the stream turns out to be uncompressed, you'd have to do a null conversion. I suppose the magic decompressor

Re: GConverter commited

2009-11-24 Thread Alexander Larsson
On Mon, 2009-11-23 at 17:22 +0100, Alexander Larsson wrote: On Mon, 2009-11-23 at 10:52 -0500, Behdad Esfahbod wrote: On 11/23/2009 10:30 AM, Alexander Larsson wrote: Please check out this API and give comments on it. I think its pretty good, as we've talked about this a bit on irc

Re: GConverter commited

2009-11-24 Thread Alexander Larsson
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.

Re: GConverter commited

2009-11-24 Thread Behdad Esfahbod
On 11/24/2009 03:29 AM, Alexander Larsson wrote: On Mon, 2009-11-23 at 17:22 +0100, Alexander Larsson wrote: On Mon, 2009-11-23 at 10:52 -0500, Behdad Esfahbod wrote: On 11/23/2009 10:30 AM, Alexander Larsson wrote: Please check out this API and give comments on it. I think its pretty good,

Re: GConverter commited

2009-11-24 Thread Behdad Esfahbod
On 11/24/2009 03:36 AM, Alexander Larsson wrote: 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

Re: GConverter commited

2009-11-24 Thread Alexander Larsson
On Tue, 2009-11-24 at 04:22 -0500, Behdad Esfahbod wrote: 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

Re: GConverter commited

2009-11-24 Thread Christian Dywan
Am Tue, 24 Nov 2009 11:16:19 +0100 schrieb Alexander Larsson al...@redhat.com: On Tue, 2009-11-24 at 04:22 -0500, Behdad Esfahbod wrote: 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

Re: GConverter commited

2009-11-24 Thread Alexander Larsson
On Tue, 2009-11-24 at 11:43 +0100, Christian Dywan wrote: However, in this particular case if we had the plugin system cache i wouldn't mind having a basic uncompression GConverter that used magic sniffing and modules for extending to new forms of compression. I have to wonder how

Re: GConverter commited

2009-11-24 Thread Shaun McCance
On Tue, 2009-11-24 at 09:36 +0100, Alexander Larsson wrote: 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

Re: GConverter commited

2009-11-24 Thread Bastien Nocera
On Tue, 2009-11-24 at 10:09 -0600, Shaun McCance wrote: snip I don't disagree. Is there a place to plop this code for people to pick it up? I'll be putting at least the bz2 and lzma converters into Yelp soon (or possibly an xv converter instead of the lzmadec-based one). I'm still

Re: GConverter commited

2009-11-24 Thread Shaun McCance
On Tue, 2009-11-24 at 16:22 +, Bastien Nocera wrote: On Tue, 2009-11-24 at 10:09 -0600, Shaun McCance wrote: snip I don't disagree. Is there a place to plop this code for people to pick it up? I'll be putting at least the bz2 and lzma converters into Yelp soon (or possibly an xv

Re: GConverter commited

2009-11-24 Thread Shaun McCance
On Tue, 2009-11-24 at 17:20 -0500, Behdad Esfahbod wrote: On 11/24/2009 11:09 AM, Shaun McCance wrote: So with my implementation, by the time you get to the magic, you've already set up a GConverterInputStream with the magic decompressor. If the stream turns out to be uncompressed,

Re: GConverter commited

2009-11-24 Thread Alexander Larsson
On Tue, 2009-11-24 at 10:09 -0600, Shaun McCance wrote: On Tue, 2009-11-24 at 09:36 +0100, Alexander Larsson wrote: I'm not sure why you'd need this, you just don't add a GConverterInputStream in that case. Well, the way I did the magic was with a GConverter that inspects its data the

Re: GConverter commited

2009-11-23 Thread Behdad Esfahbod
On 11/23/2009 10:30 AM, Alexander Larsson wrote: Please check out this API and give comments on it. I think its pretty good, as we've talked about this a bit on irc over the years, but feedback is always good. Starting to look into them. Any reason g_convert_get_type() is not defined using

Re: GConverter commited

2009-11-23 Thread Alexander Larsson
On Mon, 2009-11-23 at 10:52 -0500, Behdad Esfahbod wrote: On 11/23/2009 10:30 AM, Alexander Larsson wrote: Please check out this API and give comments on it. I think its pretty good, as we've talked about this a bit on irc over the years, but feedback is always good. Starting to look

Re: GConverter commited

2009-11-23 Thread Shaun McCance
On Mon, 2009-11-23 at 16:30 +0100, Alexander Larsson wrote: I just commited GConverter to glib master (in gio). GConverter is a generic interface for streaming data conversion. Shipping with gio are converters based on iconv and zlib compression/decompression. Additionally there is