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

Side by Side Diff: third_party/brotli/dec/decode.h

Issue 1956893002: Added brotli enc/ and tools/ directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated to most recent build tools Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « third_party/brotli/dec/Makefile ('k') | third_party/brotli/dec/decode.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright 2013 Google Inc. All Rights Reserved. 1 /* Copyright 2013 Google Inc. All Rights Reserved.
2 2
3 Distributed under MIT license. 3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT 4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5 */ 5 */
6 6
7 /* API for Brotli decompression */ 7 /* API for Brotli decompression */
8 8
9 #ifndef BROTLI_DEC_DECODE_H_ 9 #ifndef BROTLI_DEC_DECODE_H_
10 #define BROTLI_DEC_DECODE_H_ 10 #define BROTLI_DEC_DECODE_H_
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 BrotliResult BrotliDecompressStream(size_t* available_in, 72 BrotliResult BrotliDecompressStream(size_t* available_in,
73 const uint8_t** next_in, 73 const uint8_t** next_in,
74 size_t* available_out, 74 size_t* available_out,
75 uint8_t** next_out, 75 uint8_t** next_out,
76 size_t* total_out, 76 size_t* total_out,
77 BrotliState* s); 77 BrotliState* s);
78 78
79 /* Fills the new state with a dictionary for LZ77, warming up the ringbuffer, 79 /* Fills the new state with a dictionary for LZ77, warming up the ringbuffer,
80 e.g. for custom static dictionaries for data formats. 80 e.g. for custom static dictionaries for data formats.
81 Not to be confused with the built-in transformable dictionary of Brotli. 81 Not to be confused with the built-in transformable dictionary of Brotli.
82 The dictionary must exist in memory until decoding is done and is owned by 82 |size| should be less or equal to 2^24 (16MiB), otherwise the dictionary will
83 the caller. To use: 83 be ignored. The dictionary must exist in memory until decoding is done and
84 is owned by the caller. To use:
84 1) Allocate and initialize state with BrotliCreateState 85 1) Allocate and initialize state with BrotliCreateState
85 2) Use BrotliSetCustomDictionary 86 2) Use BrotliSetCustomDictionary
86 3) Use BrotliDecompressStream 87 3) Use BrotliDecompressStream
87 4) Clean up and free state with BrotliDestroyState 88 4) Clean up and free state with BrotliDestroyState
88 */ 89 */
89 void BrotliSetCustomDictionary( 90 void BrotliSetCustomDictionary(
90 size_t size, const uint8_t* dict, BrotliState* s); 91 size_t size, const uint8_t* dict, BrotliState* s);
91 92
92 /* Returns 1, if s is in a state where we have not read any input bytes yet, 93 /* Returns 1, if s is in a state where we have not read any input bytes yet,
93 and 0 otherwise */ 94 and 0 otherwise */
94 int BrotliStateIsStreamStart(const BrotliState* s); 95 int BrotliStateIsStreamStart(const BrotliState* s);
95 96
96 /* Returns 1, if s is in a state where we reached the end of the input and 97 /* Returns 1, if s is in a state where we reached the end of the input and
97 produced all of the output, and 0 otherwise. */ 98 produced all of the output, and 0 otherwise. */
98 int BrotliStateIsStreamEnd(const BrotliState* s); 99 int BrotliStateIsStreamEnd(const BrotliState* s);
99 100
100 #if defined(__cplusplus) || defined(c_plusplus) 101 #if defined(__cplusplus) || defined(c_plusplus)
101 } /* extern "C" */ 102 } /* extern "C" */
102 #endif 103 #endif
103 104
104 #endif /* BROTLI_DEC_DECODE_H_ */ 105 #endif /* BROTLI_DEC_DECODE_H_ */
OLDNEW
« no previous file with comments | « third_party/brotli/dec/Makefile ('k') | third_party/brotli/dec/decode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698