summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/compress/lz4.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-07-14 10:01:57 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-20 18:59:18 +0100
commit8410987884fbf5f71a116d4e02763324aa7300f8 (patch)
treeb6d23fe1c7f3068edf2cf923108f2014576f41ef /bitbake/lib/bb/compress/lz4.py
parent75fad23fc06c008a03414a1fc288a8614c6af9ca (diff)
downloadpoky-8410987884fbf5f71a116d4e02763324aa7300f8.tar.gz
bitbake: bitbake: Add piping compression library
Adds a library that implements file-like objects (similar to gzip.GzipFile) that can stream to arbitrary compression programs. This is utilized to implement a LZ4 and zstd compression API. (Bitbake rev: 61c3acd058ea018696bd284b3922d0b458838d05) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/compress/lz4.py')
-rw-r--r--bitbake/lib/bb/compress/lz4.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/bitbake/lib/bb/compress/lz4.py b/bitbake/lib/bb/compress/lz4.py
new file mode 100644
index 0000000000..0f6bc51a5b
--- /dev/null
+++ b/bitbake/lib/bb/compress/lz4.py
@@ -0,0 +1,17 @@
1#
2# SPDX-License-Identifier: GPL-2.0-only
3#
4
5import bb.compress._pipecompress
6
7
8def open(*args, **kwargs):
9 return bb.compress._pipecompress.open_wrap(LZ4File, *args, **kwargs)
10
11
12class LZ4File(bb.compress._pipecompress.PipeFile):
13 def get_compress(self):
14 return ["lz4c", "-z", "-c"]
15
16 def get_decompress(self):
17 return ["lz4c", "-d", "-c"]