delta_private.h 820 B

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-License-Identifier: 0BSD
  2. ///////////////////////////////////////////////////////////////////////////////
  3. //
  4. /// \file delta_private.h
  5. /// \brief Private common stuff for Delta encoder and decoder
  6. //
  7. // Author: Lasse Collin
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef LZMA_DELTA_PRIVATE_H
  11. #define LZMA_DELTA_PRIVATE_H
  12. #include "delta_common.h"
  13. typedef struct {
  14. /// Next coder in the chain
  15. lzma_next_coder next;
  16. /// Delta distance
  17. size_t distance;
  18. /// Position in history[]
  19. uint8_t pos;
  20. /// Buffer to hold history of the original data
  21. uint8_t history[LZMA_DELTA_DIST_MAX];
  22. } lzma_delta_coder;
  23. extern lzma_ret lzma_delta_coder_init(
  24. lzma_next_coder *next, const lzma_allocator *allocator,
  25. const lzma_filter_info *filters);
  26. #endif