backward_references.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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/dictionary.h"
  10. #include "../common/platform.h"
  11. #include <brotli/types.h>
  12. #include "./command.h"
  13. #include "./hash.h"
  14. #include "./quality.h"
  15. #if defined(__cplusplus) || defined(c_plusplus)
  16. extern "C" {
  17. #endif
  18. /* "commands" points to the next output command to write to, "*num_commands" is
  19. initially the total amount of commands output by previous
  20. CreateBackwardReferences calls, and must be incremented by the amount written
  21. by this call. */
  22. BROTLI_INTERNAL void BrotliCreateBackwardReferences(
  23. size_t num_bytes, size_t position, const uint8_t* ringbuffer,
  24. size_t ringbuffer_mask, const BrotliEncoderParams* params,
  25. HasherHandle hasher, int* dist_cache, size_t* last_insert_len,
  26. Command* commands, size_t* num_commands, size_t* num_literals);
  27. #if defined(__cplusplus) || defined(c_plusplus)
  28. } /* extern "C" */
  29. #endif
  30. #endif /* BROTLI_ENC_BACKWARD_REFERENCES_H_ */