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

Side by Side Diff: third_party/brotli/enc/encode.h

Issue 1995193003: Update brotli 11 May 2016 (4cc756) -> 20 May 2016 (4836af) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/decode.h ('k') | third_party/brotli/enc/encode.cc » ('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 compression 7 // API for Brotli compression
8 8
9 #ifndef BROTLI_ENC_ENCODE_H_ 9 #ifndef BROTLI_ENC_ENCODE_H_
10 #define BROTLI_ENC_ENCODE_H_ 10 #define BROTLI_ENC_ENCODE_H_
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // but we do not use either of them in quality 0. 173 // but we do not use either of them in quality 0.
174 uint8_t cmd_depths_[128]; 174 uint8_t cmd_depths_[128];
175 uint16_t cmd_bits_[128]; 175 uint16_t cmd_bits_[128];
176 // The compressed form of the command and distance prefix codes for the next 176 // The compressed form of the command and distance prefix codes for the next
177 // block in quality 0. 177 // block in quality 0.
178 uint8_t cmd_code_[512]; 178 uint8_t cmd_code_[512];
179 size_t cmd_code_numbits_; 179 size_t cmd_code_numbits_;
180 // Command and literal buffers for quality 1. 180 // Command and literal buffers for quality 1.
181 uint32_t* command_buf_; 181 uint32_t* command_buf_;
182 uint8_t* literal_buf_; 182 uint8_t* literal_buf_;
183
184 int is_last_block_emitted_;
183 }; 185 };
184 186
185 // Compresses the data in input_buffer into encoded_buffer, and sets 187 // Compresses the data in input_buffer into encoded_buffer, and sets
186 // *encoded_size to the compressed length. 188 // *encoded_size to the compressed length.
187 // Returns 0 if there was an error and 1 otherwise. 189 // Returns 0 if there was an error and 1 otherwise.
188 int BrotliCompressBuffer(BrotliParams params, 190 int BrotliCompressBuffer(BrotliParams params,
189 size_t input_size, 191 size_t input_size,
190 const uint8_t* input_buffer, 192 const uint8_t* input_buffer,
191 size_t* encoded_size, 193 size_t* encoded_size,
192 uint8_t* encoded_buffer); 194 uint8_t* encoded_buffer);
193 195
194 // Same as above, but uses the specified input and output classes instead 196 // Same as above, but uses the specified input and output classes instead
195 // of reading from and writing to pre-allocated memory buffers. 197 // of reading from and writing to pre-allocated memory buffers.
196 int BrotliCompress(BrotliParams params, BrotliIn* in, BrotliOut* out); 198 int BrotliCompress(BrotliParams params, BrotliIn* in, BrotliOut* out);
197 199
198 // Before compressing the data, sets a custom LZ77 dictionary with 200 // Before compressing the data, sets a custom LZ77 dictionary with
199 // BrotliCompressor::BrotliSetCustomDictionary. 201 // BrotliCompressor::BrotliSetCustomDictionary.
200 int BrotliCompressWithCustomDictionary(size_t dictsize, const uint8_t* dict, 202 int BrotliCompressWithCustomDictionary(size_t dictsize, const uint8_t* dict,
201 BrotliParams params, 203 BrotliParams params,
202 BrotliIn* in, BrotliOut* out); 204 BrotliIn* in, BrotliOut* out);
203 205
204 206
205 } // namespace brotli 207 } // namespace brotli
206 208
207 #endif // BROTLI_ENC_ENCODE_H_ 209 #endif // BROTLI_ENC_ENCODE_H_
OLDNEW
« no previous file with comments | « third_party/brotli/dec/decode.h ('k') | third_party/brotli/enc/encode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698