Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: third_party/brotli/dec/decode.h

Issue 1915823002: Update brotli from 722f89 (Feb 19, 2016) to 510131 (Apr 22, 2016) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/brotli/dec/bit_reader.h ('k') | third_party/brotli/dec/decode.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/brotli/dec/decode.h
diff --git a/third_party/brotli/dec/decode.h b/third_party/brotli/dec/decode.h
index 074b2f58b57090f901aaf846a9eb45e8b4387a94..7ac771e31fb153bdb1fa413d51ab47f6fd253562 100644
--- a/third_party/brotli/dec/decode.h
+++ b/third_party/brotli/dec/decode.h
@@ -9,13 +9,14 @@
#ifndef BROTLI_DEC_DECODE_H_
#define BROTLI_DEC_DECODE_H_
-#include "./state.h"
#include "./types.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
+typedef struct BrotliStateStruct BrotliState;
+
typedef enum {
/* Decoding error, e.g. corrupt input or memory allocation problem */
BROTLI_RESULT_ERROR = 0,
@@ -80,14 +81,21 @@ BrotliResult BrotliDecompressStream(size_t* available_in,
Not to be confused with the built-in transformable dictionary of Brotli.
The dictionary must exist in memory until decoding is done and is owned by
the caller. To use:
- 1) initialize state with BrotliStateInit
- 2) use BrotliSetCustomDictionary
- 3) use BrotliDecompressStream
- 4) clean up with BrotliStateCleanup
+ 1) Allocate and initialize state with BrotliCreateState
+ 2) Use BrotliSetCustomDictionary
+ 3) Use BrotliDecompressStream
+ 4) Clean up and free state with BrotliDestroyState
*/
void BrotliSetCustomDictionary(
size_t size, const uint8_t* dict, BrotliState* s);
+/* Returns 1, if s is in a state where we have not read any input bytes yet,
+ and 0 otherwise */
+int BrotliStateIsStreamStart(const BrotliState* s);
+
+/* Returns 1, if s is in a state where we reached the end of the input and
+ produced all of the output, and 0 otherwise. */
+int BrotliStateIsStreamEnd(const BrotliState* s);
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
« no previous file with comments | « third_party/brotli/dec/bit_reader.h ('k') | third_party/brotli/dec/decode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698