diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2017-03-23 11:52:20 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2017-04-08 08:24:55 +0100 |
commit | 038054be03e376671ae8a4b888dc98fdbfa3091d (patch) | |
tree | 91b3abd0c539d47878cbf8bb02d864ae7daea67f /lib | |
parent | 169c7ed34d238c7d92624f465de964af1c28adc0 (diff) |
brotli: Update to 0.5.2.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/trace/CMakeLists.txt | 2 | ||||
-rw-r--r-- | lib/trace/trace_file_brotli.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/trace/CMakeLists.txt b/lib/trace/CMakeLists.txt index a3615616..d72e0709 100644 --- a/lib/trace/CMakeLists.txt +++ b/lib/trace/CMakeLists.txt @@ -30,7 +30,7 @@ target_link_libraries (common guids highlight os - brotli_dec_bundled + brotli_dec brotli_common ) add_gtest (trace_parser_flags_test trace_parser_flags_test.cpp) diff --git a/lib/trace/trace_file_brotli.cpp b/lib/trace/trace_file_brotli.cpp index e99b010e..10d4a4dc 100644 --- a/lib/trace/trace_file_brotli.cpp +++ b/lib/trace/trace_file_brotli.cpp @@ -53,7 +53,7 @@ protected: virtual bool rawSkip(size_t length) override; virtual int rawPercentRead(void) override; private: - BrotliState state; + BrotliState *state; std::ifstream m_stream; static const size_t kFileBufferSize = 65536; uint8_t input[kFileBufferSize]; @@ -63,7 +63,7 @@ private: BrotliFile::BrotliFile(void) { - BrotliStateInit(&state); + state = BrotliCreateState(nullptr, nullptr, nullptr); available_in = 0; next_in = input; } @@ -71,7 +71,7 @@ BrotliFile::BrotliFile(void) BrotliFile::~BrotliFile() { close(); - BrotliStateCleanup(&state); + BrotliDestroyState(state); } bool BrotliFile::rawOpen(const char *filename) @@ -94,7 +94,7 @@ size_t BrotliFile::rawRead(void *buffer, size_t length) BrotliResult result; result = BrotliDecompressStream(&available_in, &next_in, &available_out, &next_out, &total_out, - &state); + state); if (result == BROTLI_RESULT_NEEDS_MORE_INPUT) { if (m_stream.fail()) { break; |