OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Crashpad Authors. All rights reserved. |
| 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (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 |
| 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. |
| 14 |
| 15 #ifndef CRASHPAD_UTIL_MISC_ZLIB_H_ |
| 16 #define CRASHPAD_UTIL_MISC_ZLIB_H_ |
| 17 |
| 18 #include <string> |
| 19 |
| 20 namespace crashpad { |
| 21 |
| 22 //! \brief Obtain a \a window_bits parameter to pass to `deflateInit2()` or |
| 23 //! `inflateInit2()` that specifies a `gzip` wrapper instead of the default |
| 24 //! zlib wrapper. |
| 25 //! |
| 26 //! \param[in] A \a window_bits value that only specifies the base-2 logarithm |
| 27 //! of the deflate sliding window size. |
| 28 //! |
| 29 //! \return \a window_bits adjusted to specify a `gzip` wrapper, to be passed to |
| 30 //! `deflateInit2()` or `inflateInit2()`. |
| 31 int ZlibWindowBitsWithGzipWrapper(int window_bits); |
| 32 |
| 33 //! \brief Formats a string for an error received from the zlib library. |
| 34 //! |
| 35 //! \param[in] zr A zlib result code, such as `Z_STREAM_ERROR`. |
| 36 //! |
| 37 //! \return A formatted string. |
| 38 std::string ZlibErrorString(int zr); |
| 39 |
| 40 } // namespace crashpad |
| 41 |
| 42 #endif // CRASHPAD_UTIL_MISC_ZLIB_H_ |
OLD | NEW |