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