1 // SPDX-License-Identifier: GPL-2.0+
4 * Lei Wen <leiwen@marvell.com>, Marvell Inc.
12 static int do_zip(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
14 unsigned long src, dst;
15 unsigned long src_len, dst_len = ~0UL;
19 dst_len = hextoul(argv[4], NULL);
22 src = hextoul(argv[1], NULL);
23 src_len = hextoul(argv[2], NULL);
24 dst = hextoul(argv[3], NULL);
27 return cmd_usage(cmdtp);
30 if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
33 printf("Compressed size: %lu = 0x%lX\n", dst_len, dst_len);
34 env_set_hex("filesize", dst_len);
41 "zip a memory region",
42 "srcaddr srcsize dstaddr [dstsize]"