On Thu Dec 31 07:01:34 2015, MGV wrote:
Show quoted text> "Paul Marquess via RT" <bug-IO-Compress@rt.cpan.org> writes:
>
> > writing a tutorial for this would be difficult - the code isn't well
> > enough structured to allow an easy tutorial. The source is probably
> > your best bet. Also - not all compression libraries are suitable for
> > the IO:Compress treatment. Which were you planning to implement?
>
> When I said "tutorial" I was thinking of something of the form "Here's a
> list of methods you must/should implement and what each of them should do".
That would be good to do. Will add it to my (long) list of things to deal with.
Show quoted text> I am implementing a module for the Brotli compression format, which is
> the format originally used in web fonts and more recently as a HTTP
> Content-Encoding, thus replacing gzip and deflate. At the moment it's
> only implemented in Firefox, but moreimplementations are coming.
>
> The official repository is
https://github.com/google/brotli/
Yep - looked at that one a while ago. It's on my list of compression formats to keep an eye on. My main problem is getting the time to devote to my perl modules at the moment.
If you want this to work with IO::Compress it has to use the Brolti streaming interface that allows compression/uncompression to be done a bit at a time. I *think* Brolti also has an interface that takes the complete compressed input and uncompresses (and the same for compression) -- that won't work with IO::Compress.
Show quoted text> I will release an initial version today. It will only handle
> decompression (I still have to figure out how to use XS with C++, as the
> official compression code is C++ while the decompression code is C), and
> it will be a simple wrapper around the official API.
That makes sense. The IO::Compress code assumes there is a module that handles the API to the compresion library. For example all the zlib based IO::Compress modules (gzip, deflate, zip) use Compress::Raw::Zlib to access the library.
Show quoted text> In the following
> weeks, after I read the source of IO::{Unc,C}ompress::Base, I'll release
> updated versions that support compression and follow the
> IO::{Unc,C}ompress API.
>
> > Please shout if you get stuck & need a hand.
>
> Alright.
>
> > sorry for the delay in replying. Christmas got in the way.
>
> No problem, thanks for your reply!
cheers
Paul
ps - I see Perl6 has a Brolti module. See
https://github.com/sylvarant/Compress-Brotli