From 226d21c4038c1319b9963c0fcf5ae275c8093347 Mon Sep 17 00:00:00 2001 From: eustas Date: Wed, 18 May 2016 11:01:16 +0200 Subject: [PATCH] Make encoder API more safe Add flag to check if "last" block has been already processed --- enc/encode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/enc/encode.h b/enc/encode.h index a06aa40..1b0885e 100644 --- a/enc/encode.h +++ b/enc/encode.h @@ -180,6 +180,8 @@ class BrotliCompressor { // Command and literal buffers for quality 1. uint32_t* command_buf_; uint8_t* literal_buf_; + + int is_last_block_emitted_; }; // Compresses the data in input_buffer into encoded_buffer, and sets