blob: aed8df306e97d612afbe84095fcbfd54801f9e0d [file] [log] [blame]
Masahiro Yamada18f65db2018-01-26 11:42:01 +09001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __IMAGE_DECOMPRESS_H__
8#define __IMAGE_DECOMPRESS_H__
9
10#include <stddef.h>
11#include <stdint.h>
12
13struct image_info;
14
15typedef int (decompressor_t)(uintptr_t *in_buf, size_t in_len,
16 uintptr_t *out_buf, size_t out_len,
17 uintptr_t work_buf, size_t work_len);
18
19void image_decompress_init(uintptr_t buf_base, uint32_t buf_size,
20 decompressor_t *decompressor);
21void image_decompress_prepare(struct image_info *info);
22int image_decompress(struct image_info *info);
23
24#endif /* __IMAGE_DECOMPRESS_H___ */