delta_private.h 889 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. /// \file delta_private.h
  4. /// \brief Private common stuff for Delta encoder and decoder
  5. //
  6. // Author: Lasse Collin
  7. //
  8. // This file has been put into the public domain.
  9. // You can do whatever you want with this file.
  10. //
  11. ///////////////////////////////////////////////////////////////////////////////
  12. #ifndef LZMA_DELTA_PRIVATE_H
  13. #define LZMA_DELTA_PRIVATE_H
  14. #include "delta_common.h"
  15. typedef struct {
  16. /// Next coder in the chain
  17. lzma_next_coder next;
  18. /// Delta distance
  19. size_t distance;
  20. /// Position in history[]
  21. uint8_t pos;
  22. /// Buffer to hold history of the original data
  23. uint8_t history[LZMA_DELTA_DIST_MAX];
  24. } lzma_delta_coder;
  25. extern lzma_ret lzma_delta_coder_init(
  26. lzma_next_coder *next, const lzma_allocator *allocator,
  27. const lzma_filter_info *filters);
  28. #endif