bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] Enhancement: brotli integration into tar


From: Marius Spix
Subject: Re: [Bug-tar] Enhancement: brotli integration into tar
Date: Sat, 7 Oct 2017 16:01:08 +0200

Hi together,

thank you for your feedback. I dropped the shortcut y.
Autodetection with the `a' function is possible when you use the file
extension .tbr.

Brotli is based on LZ77 and Huffman encoding, but comes with an inbuilt
dictionary for HTML, CSS and JavaScript as well as common English,
Spanish, Russian, Arabic, Chinese and Hindi terms and year numbers, but
also supports custom dictionaries (not supported by the tar
implementation, though). This makes tar.br, or short tbr, the ideal
format to archive static HTML documents and CSS stylesheets.

Please find the attached patch file. I am looking forward to reading
your feedback.

Best regards,

Marius

On Thu, 04 Oct 2017 13:59:02 +0300
Sergey Poznyakoff <address@hidden> wrote:

> Hi Marius,
> 
> Thanks for the patch.
> 
> There are two issues that strike the eye at the first glance.
> First of all, the -y option is in fact reserved (see comment
> in tar.c:373.
> 
> Second one is more serious:
> 
> >  static enum compress_type archive_compression_type = ct_none;
> > @@ -299,6 +300,9 @@
> >    { ct_lzma,     6, "\xFFLZMA" },
> >    { ct_lzop,     4, "\211LZO" },
> >    { ct_xz,       6, "\xFD" "7zXZ" },
> > +  { ct_brotli,   4, "\x91\x19\x62\x66" }, /* suggested by Joe Tsai
> > */
> > +  { ct_brotli,   4, "\xCE\xB2\xCF\x81" }, /* suggested by Mark
> > Adler */
> > +  { ct_brotli,   0, 0 }                   /* unframed stream */
> >  };  
> 
> The last line means that compression recognition code will qualify any
> file not matching any of the previous entries as brotli archive. I
> don't think it is correct.
> 
> Regards,
> Sergey
> 
> 

Attachment: tar_brotli.patch
Description: Text Data


reply via email to

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