TransRead: add pbzip2 support
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 28 Jan 2014 11:17:34 +0000 (13:17 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 28 Jan 2014 12:23:22 +0000 (14:23 +0200)
commit790127a070f20b29e65a210f44d8d1b78e717797
tree462cb74330b04e61de387b77eea7c631e9e2f999
parent9a8b3d06bfbab6d78eb624ba3e2d03b39ab90706
TransRead: add pbzip2 support

This patch adds support for multi-stream bz2 files (creted with pbzip2).
Unfortunately, the standard python 2.7 'bz2' module does not support it, so we
use the 'bz2file' module from PyPI.

'bz2file' may not be present in the system, in which case we fall-back to the
standard python 2.7 'bz2' module. As a bonus, 'bz2file' is a little bit faster
than 'bz2' even for single-stream archives.

Change-Id: I7b473987a3bda0241f49da5bbdf1a8a2b3841400
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/TransRead.py