| OLD | NEW |
| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 /* "Impossible" states */ | 67 /* "Impossible" states */ |
| 68 BROTLI_ERROR_UNREACHABLE_1 = -31, | 68 BROTLI_ERROR_UNREACHABLE_1 = -31, |
| 69 BROTLI_ERROR_UNREACHABLE_2 = -32, | 69 BROTLI_ERROR_UNREACHABLE_2 = -32, |
| 70 BROTLI_ERROR_UNREACHABLE_3 = -33, | 70 BROTLI_ERROR_UNREACHABLE_3 = -33, |
| 71 BROTLI_ERROR_UNREACHABLE_4 = -34, | 71 BROTLI_ERROR_UNREACHABLE_4 = -34, |
| 72 BROTLI_ERROR_UNREACHABLE_5 = -35, | 72 BROTLI_ERROR_UNREACHABLE_5 = -35, |
| 73 BROTLI_ERROR_UNREACHABLE_6 = -36 | 73 BROTLI_ERROR_UNREACHABLE_6 = -36 |
| 74 } BrotliErrorCode; | 74 } BrotliErrorCode; |
| 75 | 75 |
| 76 #define BROTLI_LAST_ERROR_CODE BROTLI_ERROR_UNREACHABLE_6 |
| 77 |
| 76 /* Creates the instance of BrotliState and initializes it. |alloc_func| and | 78 /* Creates the instance of BrotliState and initializes it. |alloc_func| and |
| 77 |free_func| MUST be both zero or both non-zero. In the case they are both | 79 |free_func| MUST be both zero or both non-zero. In the case they are both |
| 78 zero, default memory allocators are used. |opaque| is passed to |alloc_func| | 80 zero, default memory allocators are used. |opaque| is passed to |alloc_func| |
| 79 and |free_func| when they are called. */ | 81 and |free_func| when they are called. */ |
| 80 BrotliState* BrotliCreateState( | 82 BrotliState* BrotliCreateState( |
| 81 brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque); | 83 brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque); |
| 82 | 84 |
| 83 /* Deinitializes and frees BrotliState instance. */ | 85 /* Deinitializes and frees BrotliState instance. */ |
| 84 void BrotliDestroyState(BrotliState* state); | 86 void BrotliDestroyState(BrotliState* state); |
| 85 | 87 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 147 |
| 146 /* Returns detailed error code after BrotliDecompressStream returns | 148 /* Returns detailed error code after BrotliDecompressStream returns |
| 147 BROTLI_RESULT_ERROR. */ | 149 BROTLI_RESULT_ERROR. */ |
| 148 BrotliErrorCode BrotliGetErrorCode(const BrotliState* s); | 150 BrotliErrorCode BrotliGetErrorCode(const BrotliState* s); |
| 149 | 151 |
| 150 #if defined(__cplusplus) || defined(c_plusplus) | 152 #if defined(__cplusplus) || defined(c_plusplus) |
| 151 } /* extern "C" */ | 153 } /* extern "C" */ |
| 152 #endif | 154 #endif |
| 153 | 155 |
| 154 #endif /* BROTLI_DEC_DECODE_H_ */ | 156 #endif /* BROTLI_DEC_DECODE_H_ */ |
| OLD | NEW |