1*54fd6939SJiyong Park /* 2*54fd6939SJiyong Park * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. 3*54fd6939SJiyong Park * 4*54fd6939SJiyong Park * SPDX-License-Identifier: BSD-3-Clause 5*54fd6939SJiyong Park */ 6*54fd6939SJiyong Park 7*54fd6939SJiyong Park #ifndef IMAGE_DECOMPRESS_H 8*54fd6939SJiyong Park #define IMAGE_DECOMPRESS_H 9*54fd6939SJiyong Park 10*54fd6939SJiyong Park #include <stddef.h> 11*54fd6939SJiyong Park #include <stdint.h> 12*54fd6939SJiyong Park 13*54fd6939SJiyong Park struct image_info; 14*54fd6939SJiyong Park 15*54fd6939SJiyong Park typedef int (decompressor_t)(uintptr_t *in_buf, size_t in_len, 16*54fd6939SJiyong Park uintptr_t *out_buf, size_t out_len, 17*54fd6939SJiyong Park uintptr_t work_buf, size_t work_len); 18*54fd6939SJiyong Park 19*54fd6939SJiyong Park void image_decompress_init(uintptr_t buf_base, uint32_t buf_size, 20*54fd6939SJiyong Park decompressor_t *decompressor); 21*54fd6939SJiyong Park void image_decompress_prepare(struct image_info *info); 22*54fd6939SJiyong Park int image_decompress(struct image_info *info); 23*54fd6939SJiyong Park 24*54fd6939SJiyong Park #endif /* IMAGE_DECOMPRESS_H */ 25