2015-11-27 10:27:11 +00:00
|
|
|
/* Copyright 2013 Google Inc. All Rights Reserved.
|
|
|
|
|
2015-12-11 10:11:51 +00:00
|
|
|
Distributed under MIT license.
|
2015-11-27 10:27:11 +00:00
|
|
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
|
|
|
*/
|
|
|
|
|
2016-06-03 09:19:23 +00:00
|
|
|
/* Function to find backward reference copies. */
|
2013-10-23 11:06:13 +00:00
|
|
|
|
|
|
|
#ifndef BROTLI_ENC_BACKWARD_REFERENCES_H_
|
|
|
|
#define BROTLI_ENC_BACKWARD_REFERENCES_H_
|
|
|
|
|
2022-11-17 13:03:09 +00:00
|
|
|
#include <brotli/types.h>
|
|
|
|
|
2016-10-17 15:33:12 +00:00
|
|
|
#include "../common/constants.h"
|
2019-04-12 11:57:42 +00:00
|
|
|
#include "../common/context.h"
|
2017-03-06 13:22:45 +00:00
|
|
|
#include "../common/dictionary.h"
|
2017-12-12 13:33:12 +00:00
|
|
|
#include "../common/platform.h"
|
2021-09-08 07:18:45 +00:00
|
|
|
#include "command.h"
|
|
|
|
#include "hash.h"
|
|
|
|
#include "quality.h"
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-13 09:01:04 +00:00
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-03 09:19:23 +00:00
|
|
|
/* "commands" points to the next output command to write to, "*num_commands" is
|
|
|
|
initially the total amount of commands output by previous
|
|
|
|
CreateBackwardReferences calls, and must be incremented by the amount written
|
|
|
|
by this call. */
|
2018-10-24 14:06:09 +00:00
|
|
|
BROTLI_INTERNAL void BrotliCreateBackwardReferences(size_t num_bytes,
|
|
|
|
size_t position, const uint8_t* ringbuffer, size_t ringbuffer_mask,
|
2019-04-12 11:57:42 +00:00
|
|
|
ContextLut literal_context_lut, const BrotliEncoderParams* params,
|
|
|
|
Hasher* hasher, int* dist_cache, size_t* last_insert_len,
|
2017-12-12 13:33:12 +00:00
|
|
|
Command* commands, size_t* num_commands, size_t* num_literals);
|
2016-06-13 09:01:04 +00:00
|
|
|
|
|
|
|
#if defined(__cplusplus) || defined(c_plusplus)
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
2013-10-23 11:06:13 +00:00
|
|
|
|
2016-06-03 09:19:23 +00:00
|
|
|
#endif /* BROTLI_ENC_BACKWARD_REFERENCES_H_ */
|