u-boot-amlogic.groups.io archive mirror
 help / color / mirror / Atom feed
From: Artem Lapkin <email2tema@gmail.com>
To: trini@konsulko.com, narmstrong@baylibre.com
Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io,
	christianshewitt@gmail.com, sjg@chromium.org, art@khadas.com,
	nick@khadas.com, gouwa@khadas.com
Subject: [PATCH] image: add lz4 zstd compression magic map
Date: Tue, 31 Aug 2021 18:22:18 +0800	[thread overview]
Message-ID: <20210831102218.2960058-1-art@khadas.com> (raw)

Add lz4 and zstd compression magic map. Already can decompress images
with lz4 and zstd compression type.

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 common/image.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/image.c b/common/image.c
index 59c52a1f9a..e199d61a4c 100644
--- a/common/image.c
+++ b/common/image.c
@@ -216,6 +216,8 @@ static const struct comp_magic_map image_comp[] = {
 	{	IH_COMP_GZIP,	"gzip",		{0x1f, 0x8b},},
 	{	IH_COMP_LZMA,	"lzma",		{0x5d, 0x00},},
 	{	IH_COMP_LZO,	"lzo",		{0x89, 0x4c},},
+	{	IH_COMP_LZ4,    "lz4",          {0x04, 0x22},},
+	{	IH_COMP_ZSTD,   "zstd",         {0x28, 0xb5},},
 	{	IH_COMP_NONE,	"none",		{},	},
 };
 
-- 
2.25.1


                 reply	other threads:[~2021-08-31 10:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210831102218.2960058-1-art@khadas.com \
    --to=email2tema@gmail.com \
    --cc=art@khadas.com \
    --cc=christianshewitt@gmail.com \
    --cc=gouwa@khadas.com \
    --cc=narmstrong@baylibre.com \
    --cc=nick@khadas.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).