9#ifndef BROTLI_ENC_STATE_H_
10#define BROTLI_ENC_STATE_H_
15#include "compress_fragment.h"
16#include "compress_fragment_two_pass.h"
20#include "ringbuffer.h"
22typedef enum BrotliEncoderStreamState {
24 BROTLI_STREAM_PROCESSING = 0,
27 BROTLI_STREAM_FLUSH_REQUESTED = 1,
29 BROTLI_STREAM_FINISHED = 2,
31 BROTLI_STREAM_METADATA_HEAD = 3,
33 BROTLI_STREAM_METADATA_BODY = 4
34} BrotliEncoderStreamState;
36typedef enum BrotliEncoderFlintState {
37 BROTLI_FLINT_NEEDS_2_BYTES = 2,
38 BROTLI_FLINT_NEEDS_1_BYTE = 1,
39 BROTLI_FLINT_WAITING_FOR_PROCESSING = 0,
40 BROTLI_FLINT_WAITING_FOR_FLUSHING = -1,
41 BROTLI_FLINT_DONE = -2
42} BrotliEncoderFlintState;
51 size_t cmd_alloc_size_;
55 size_t last_insert_len_;
56 uint64_t last_flush_pos_;
57 uint64_t last_processed_pos_;
58 int dist_cache_[BROTLI_NUM_DISTANCE_SHORT_CODES];
59 int saved_dist_cache_[4];
61 uint8_t last_bytes_bits_;
74 int small_table_[1 << 10];
76 size_t large_table_size_;
82 uint32_t* command_buf_;
83 uint8_t* literal_buf_;
87 size_t available_out_;
94 uint32_t remaining_metadata_bytes_;
95 BrotliEncoderStreamState stream_state_;
102#define BrotliEncoderState BrotliEncoderStateInternal
Definition: compress_fragment.h:25
Definition: compress_fragment_two_pass.h:29
Definition: command.h:108
Definition: ringbuffer.h:33
Common types used in decoder and encoder API.
#define BROTLI_BOOL
A portable bool replacement.
Definition: types.h:49