| OLD | NEW |
| 1 /* Copyright 2013 Google Inc. All Rights Reserved. | 1 /* Copyright 2013 Google Inc. All Rights Reserved. |
| 2 | 2 |
| 3 Licensed under the Apache License, Version 2.0 (the "License"); | 3 Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 you may not use this file except in compliance with the License. | 4 you may not use this file except in compliance with the License. |
| 5 You may obtain a copy of the License at | 5 You may obtain a copy of the License at |
| 6 | 6 |
| 7 http://www.apache.org/licenses/LICENSE-2.0 | 7 http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | 8 |
| 9 Unless required by applicable law or agreed to in writing, software | 9 Unless required by applicable law or agreed to in writing, software |
| 10 distributed under the License is distributed on an "AS IS" BASIS, | 10 distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #if defined(__cplusplus) || defined(c_plusplus) | 25 #if defined(__cplusplus) || defined(c_plusplus) |
| 26 extern "C" { | 26 extern "C" { |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 typedef enum { | 29 typedef enum { |
| 30 /* Decoding error, e.g. corrupt input or no memory */ | 30 /* Decoding error, e.g. corrupt input or no memory */ |
| 31 BROTLI_RESULT_ERROR = 0, | 31 BROTLI_RESULT_ERROR = 0, |
| 32 /* Successfully completely done */ | 32 /* Successfully completely done */ |
| 33 BROTLI_RESULT_SUCCESS = 1, | 33 BROTLI_RESULT_SUCCESS = 1, |
| 34 /* Partially done, but must be called again with more input */ | 34 /* Partially done, but must be called again with more input */ |
| 35 BROTLI_RESULT_PARTIAL = 2 | 35 BROTLI_RESULT_NEEDS_MORE_INPUT = 2, |
| 36 /* Partially done, but must be called again with more output */ |
| 37 BROTLI_RESULT_NEEDS_MORE_OUTPUT = 3 |
| 36 } BrotliResult; | 38 } BrotliResult; |
| 37 | 39 |
| 38 /* Sets *decoded_size to the decompressed size of the given encoded stream. */ | 40 /* Sets *decoded_size to the decompressed size of the given encoded stream. */ |
| 39 /* This function only works if the encoded buffer has a single meta block, */ | 41 /* This function only works if the encoded buffer has a single meta block, */ |
| 40 /* or if it has two meta-blocks, where the first is uncompressed and the */ | 42 /* or if it has two meta-blocks, where the first is uncompressed and the */ |
| 41 /* second is empty. */ | 43 /* second is empty. */ |
| 42 /* Returns 1 on success, 0 on failure. */ | 44 /* Returns 1 on success, 0 on failure. */ |
| 43 BrotliResult BrotliDecompressedSize(size_t encoded_size, | 45 BrotliResult BrotliDecompressedSize(size_t encoded_size, |
| 44 const uint8_t* encoded_buffer, | 46 const uint8_t* encoded_buffer, |
| 45 size_t* decoded_size); | 47 size_t* decoded_size); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 size_t* available_out, | 121 size_t* available_out, |
| 120 uint8_t** next_out, | 122 uint8_t** next_out, |
| 121 size_t* total_out, | 123 size_t* total_out, |
| 122 BrotliState* s); | 124 BrotliState* s); |
| 123 | 125 |
| 124 #if defined(__cplusplus) || defined(c_plusplus) | 126 #if defined(__cplusplus) || defined(c_plusplus) |
| 125 } /* extern "C" */ | 127 } /* extern "C" */ |
| 126 #endif | 128 #endif |
| 127 | 129 |
| 128 #endif /* BROTLI_DEC_DECODE_H_ */ | 130 #endif /* BROTLI_DEC_DECODE_H_ */ |
| OLD | NEW |