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

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


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.)

[snip]
-------------- 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/be1ef7bc/attachment.sig>


More information about the Piglit mailing list