+++ /dev/null
-/* Copyright 2015 Google Inc. All Rights Reserved.\r
-\r
- Distributed under MIT license.\r
- See file LICENSE for detail or copy at https://opensource.org/licenses/MIT\r
-*/\r
-\r
-/* Function for fast encoding of an input fragment, independently from the input\r
- history. This function uses one-pass processing: when we find a backward\r
- match, we immediately emit the corresponding command and literal codes to\r
- the bit stream. */\r
-\r
-#ifndef BROTLI_ENC_COMPRESS_FRAGMENT_H_\r
-#define BROTLI_ENC_COMPRESS_FRAGMENT_H_\r
-\r
-#include "../common/platform.h"\r
-#include <brotli/types.h>\r
-#include "./memory.h"\r
-\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-extern "C" {\r
-#endif\r
-\r
-/* Compresses "input" string to the "*storage" buffer as one or more complete\r
- meta-blocks, and updates the "*storage_ix" bit position.\r
-\r
- If "is_last" is 1, emits an additional empty last meta-block.\r
-\r
- "cmd_depth" and "cmd_bits" contain the command and distance prefix codes\r
- (see comment in encode.h) used for the encoding of this input fragment.\r
- If "is_last" is 0, they are updated to reflect the statistics\r
- of this input fragment, to be used for the encoding of the next fragment.\r
-\r
- "*cmd_code_numbits" is the number of bits of the compressed representation\r
- of the command and distance prefix codes, and "cmd_code" is an array of\r
- at least "(*cmd_code_numbits + 7) >> 3" size that contains the compressed\r
- command and distance prefix codes. If "is_last" is 0, these are also\r
- updated to represent the updated "cmd_depth" and "cmd_bits".\r
-\r
- REQUIRES: "input_size" is greater than zero, or "is_last" is 1.\r
- REQUIRES: "input_size" is less or equal to maximal metablock size (1 << 24).\r
- REQUIRES: All elements in "table[0..table_size-1]" are initialized to zero.\r
- REQUIRES: "table_size" is an odd (9, 11, 13, 15) power of two\r
- OUTPUT: maximal copy distance <= |input_size|\r
- OUTPUT: maximal copy distance <= BROTLI_MAX_BACKWARD_LIMIT(18) */\r
-BROTLI_INTERNAL void BrotliCompressFragmentFast(MemoryManager* m,\r
- const uint8_t* input,\r
- size_t input_size,\r
- BROTLI_BOOL is_last,\r
- int* table, size_t table_size,\r
- uint8_t cmd_depth[128],\r
- uint16_t cmd_bits[128],\r
- size_t* cmd_code_numbits,\r
- uint8_t* cmd_code,\r
- size_t* storage_ix,\r
- uint8_t* storage);\r
-\r
-#if defined(__cplusplus) || defined(c_plusplus)\r
-} /* extern "C" */\r
-#endif\r
-\r
-#endif /* BROTLI_ENC_COMPRESS_FRAGMENT_H_ */\r