mirror of
https://git.yoctoproject.org/poky
synced 2026-02-12 19:53:03 +01:00
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>
18 lines
364 B
Python
18 lines
364 B
Python
#
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
|
|
import bb.compress._pipecompress
|
|
|
|
|
|
def open(*args, **kwargs):
|
|
return bb.compress._pipecompress.open_wrap(LZ4File, *args, **kwargs)
|
|
|
|
|
|
class LZ4File(bb.compress._pipecompress.PipeFile):
|
|
def get_compress(self):
|
|
return ["lz4c", "-z", "-c"]
|
|
|
|
def get_decompress(self):
|
|
return ["lz4c", "-d", "-c"]
|