From 4f463e3dee863cdfeb34f37bcca6ae0cb46f7b51 Mon Sep 17 00:00:00 2001 From: Stefan Herbrechtsmeier Date: Fri, 19 Aug 2022 16:25:27 +0200 Subject: binman: Remove obsolete compressed data header handling Remove the obsolete compressed data header handling from the utilities to compress and decompress data. The header is uncommon, not supported by U-Boot and incompatible with external compressed artifacts. Signed-off-by: Stefan Herbrechtsmeier Reviewed-by: Simon Glass --- tools/binman/comp_util.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'tools/binman/comp_util.py') diff --git a/tools/binman/comp_util.py b/tools/binman/comp_util.py index dc76adab352..269bbf79756 100644 --- a/tools/binman/comp_util.py +++ b/tools/binman/comp_util.py @@ -3,7 +3,6 @@ # """Utilities to compress and decompress data""" -import struct import tempfile from binman import bintool @@ -16,7 +15,7 @@ LZMA_ALONE = bintool.Bintool.create('lzma_alone') HAVE_LZMA_ALONE = LZMA_ALONE.is_present() -def compress(indata, algo, with_header=True): +def compress(indata, algo): """Compress some data using a given algorithm Note that for lzma this uses an old version of the algorithm, not that @@ -41,12 +40,9 @@ def compress(indata, algo, with_header=True): data = LZMA_ALONE.compress(indata) else: raise ValueError("Unknown algorithm '%s'" % algo) - if with_header: - hdr = struct.pack('