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