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