backward_references.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Copyright 2013 Google Inc. All Rights Reserved.
  2. Distributed under MIT license.
  3. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
  4. */
  5. /* Function to find backward reference copies. */
  6. #ifndef BROTLI_ENC_BACKWARD_REFERENCES_H_
  7. #define BROTLI_ENC_BACKWARD_REFERENCES_H_
  8. #include "../common/constants.h"
  9. #include "../common/context.h"
  10. #include "../common/dictionary.h"
  11. #include "../common/platform.h"
  12. #include <brotli/types.h>
  13. #include "./command.h"
  14. #include "./hash.h"
  15. #include "./quality.h"
  16. #if defined(__cplusplus) || defined(c_plusplus)
  17. extern "C" {
  18. #endif
  19. /* "commands" points to the next output command to write to, "*num_commands" is
  20. initially the total amount of commands output by previous
  21. CreateBackwardReferences calls, and must be incremented by the amount written
  22. by this call. */
  23. BROTLI_INTERNAL void BrotliCreateBackwardReferences(size_t num_bytes,
  24. size_t position, const uint8_t* ringbuffer, size_t ringbuffer_mask,
  25. ContextLut literal_context_lut, const BrotliEncoderParams* params,
  26. Hasher* hasher, int* dist_cache, size_t* last_insert_len,
  27. Command* commands, size_t* num_commands, size_t* num_literals);
  28. #if defined(__cplusplus) || defined(c_plusplus)
  29. } /* extern "C" */
  30. #endif
  31. #endif /* BROTLI_ENC_BACKWARD_REFERENCES_H_ */