aboutsummaryrefslogtreecommitdiff
path: root/c/include
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2017-06-13 12:52:56 +0200
committerGitHub <noreply@github.com>2017-06-13 12:52:56 +0200
commit05d5f3d77a3445b464c230b382855979e1b89fef (patch)
tree452a38544c2107493ad0ff5cb92545991748f5ab /c/include
parent0fceb906eceefde1548c2ba2b215cc4473ca5175 (diff)
downloadbrotli-05d5f3d77a3445b464c230b382855979e1b89fef.zip
brotli-05d5f3d77a3445b464c230b382855979e1b89fef.tar.gz
brotli-05d5f3d77a3445b464c230b382855979e1b89fef.tar.bz2
Update (#560)
Update: * add decoder API to avoid ringbuffer reallocation * fix MSVC warnings * remove dead code
Diffstat (limited to 'c/include')
-rwxr-xr-xc/include/brotli/decode.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/c/include/brotli/decode.h b/c/include/brotli/decode.h
index 93cbe38..b18e9e4 100755
--- a/c/include/brotli/decode.h
+++ b/c/include/brotli/decode.h
@@ -126,6 +126,29 @@ typedef enum {
*/
#define BROTLI_LAST_ERROR_CODE BROTLI_DECODER_ERROR_UNREACHABLE
+/** Options to be used with ::BrotliDecoderSetParameter. */
+typedef enum BrotliDecoderParameter {
+ /**
+ * Disable "canny" ring buffer allocation strategy.
+ *
+ * Ring buffer is allocated according to window size, despite the real size of
+ * the content.
+ */
+ BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION = 0
+} BrotliDecoderParameter;
+
+/**
+ * Sets the specified parameter to the given decoder instance.
+ *
+ * @param state decoder instance
+ * @param param parameter to set
+ * @param value new parameter value
+ * @returns ::BROTLI_FALSE if parameter is unrecognized, or value is invalid
+ * @returns ::BROTLI_TRUE if value is accepted
+ */
+BROTLI_DEC_API BROTLI_BOOL BrotliDecoderSetParameter(
+ BrotliDecoderState* state, BrotliDecoderParameter param, uint32_t value);
+
/**
* Creates an instance of ::BrotliDecoderState and initializes it.
*