[Piglit] [PATCH v3 3/3] framework: add support for bz2 compression.

Dylan Baker baker.dylan.c at gmail.com
Mon Jun 29 16:58:19 PDT 2015

On Mon, Jun 29, 2015 at 07:51:27PM -0400, Ilia Mirkin wrote:
> On Mon, Jun 29, 2015 at 7:50 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> > On Mon, Jun 29, 2015 at 07:34:46PM -0400, Ilia Mirkin wrote:
> >> Seems easy enough to just add a generic "run shell command X"
> >> compressor/decompressor... I always xz -9 piglit files, it gets
> >> *great* compression.
> >
> > Well, if xz was supported in python2 I wouldn't have bothered with
> > either gzip or bz2, since xz is clearly the best choice in most cases
> > (although someone like Rob or Eric might prefer gzip since it's less CPU
> > intensive). Also, pytho defaults to maximum compression level for all
> > of the compression formats it supports.
> >
> > But as to why do it in python rather than running magic shell
> > invocations for compressing/decompressing?
> > 1) No magic shell invocations to remember, it "just works"
> > 2) It's portable. Since it's all in python you don't have to worry about
> >    whether your OS/machine has the right binaries or even supports the
> >    right binaries, or if they're in your path, etc.
> > 3) If you've already compressed your results you can drop the magic
> >    shell invocations, and just point piglit at them. (I have a python 3
> >    branch which does have xz support, and I can just point piglit at a
> >    directory with an xz file in it and it works.)
> Perhaps you misunderstood my comment. I meant why not have python call
> out to 'xz' and whatnot, instead of using the built-in facilities. I
> agree that it's nice to be cross-platform, but I don't think anyone
> will cry if python2 on windows is missing xz.
>   -ilia

grrr, I responded from my intel account that wont hit the list....

Yes, I did misunderstand your comment.

I'll spend another patch to add xz by calling out to the shell. We can
make it work universally in python 3. I'll leave gz and bzip2, since
they will work on windows/mac/a unix that doesn't have an xz binary, and
at least having decompression support for them would be nice.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150629/36fd272f/attachment-0001.sig>

More information about the Piglit mailing list