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