image_decompress.h 635 B

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