Re: [hackers] [farbfeld] Add support for .bz2 to 2ff

From: Willy Goiffon <willy_AT_mailoo.org>
Date: Thu, 14 Jul 2016 11:04:24 +0200

FRIGN wrote:
> On Thu, 14 Jul 2016 09:55:07 +0200
> Willy Goiffon <willy_AT_mailoo.org> wrote:
>
> Hey Willy,
>
> > If figured it would be great to have `2ff` support bzip2 compressed
> > farbfeld images, in order to start promoting this format.
> > Attached is a patch adding support for bzip2 compressed files to
> > `2ff`.
>
> thanks for your patch. At first I was worried that it might expand
> the scope of 2ff too much, but it really is no problem.
> However, I'm worry about other people approaching with questions to
> also add lzma and other formats for completeness.

This might get out of hand yeah, fair point. Though bzip2 is the recommended
format on farbfeld's page so it *might* deserve a special treatment.

> You probably had sent[0] in mind when you wrote this patch, but
> looking at the filter rules
>
> static Filter filters[] = {
> { "\\.(png|jpg|gif)$", "2ff" },
> };
>
> it is easy to add
>
> static Filter filters[] = {
> { "\\.ff.bz2$", "bunzip" },
> };
>
> with the same effect.
>
> Can you give me a good reason or context example where adding the
> compression support to 2ff proves to be useful?

This was indeed to use with `sent`. Not sure why I did not think about adding a
filter. It makes much more sense.
As discussed on IRC, I do agree that it would make sense to add a default filter
for .ff images at least (`{ "\\.ff$", "cat" },`). Maybe not for .ff.bzip, as it
might suffer the same need for "completeness" as 2ff regarding all other
compression format.

Thanks for your pointers!

-- 
Willy
Received on Thu Jul 14 2016 - 11:04:24 CEST

This archive was generated by hypermail 2.3.0 : Thu Jul 14 2016 - 11:12:15 CEST