xref: /OK3568_Linux_fs/yocto/poky/bitbake/lib/bb/compress/lz4.py (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# Copyright BitBake Contributors
3*4882a593Smuzhiyun#
4*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only
5*4882a593Smuzhiyun#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyunimport bb.compress._pipecompress
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun
10*4882a593Smuzhiyundef open(*args, **kwargs):
11*4882a593Smuzhiyun    return bb.compress._pipecompress.open_wrap(LZ4File, *args, **kwargs)
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun
14*4882a593Smuzhiyunclass LZ4File(bb.compress._pipecompress.PipeFile):
15*4882a593Smuzhiyun    def get_compress(self):
16*4882a593Smuzhiyun        return ["lz4c", "-z", "-c"]
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun    def get_decompress(self):
19*4882a593Smuzhiyun        return ["lz4c", "-d", "-c"]
20