Masahiro Yamada | 18f65db | 2018-01-26 11:42:01 +0900 | [diff] [blame] | 1 | /* |
| 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 | |
| 13 | struct image_info; |
| 14 | |
| 15 | typedef 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 | |
| 19 | void image_decompress_init(uintptr_t buf_base, uint32_t buf_size, |
| 20 | decompressor_t *decompressor); |
| 21 | void image_decompress_prepare(struct image_info *info); |
| 22 | int image_decompress(struct image_info *info); |
| 23 | |
| 24 | #endif /* __IMAGE_DECOMPRESS_H___ */ |