CGRPCZlib.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright 2020, gRPC Authors All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef C_GRPC_ZLIB_H_
  17. #define C_GRPC_ZLIB_H_
  18. #include <zlib.h>
  19. static inline int CGRPCNIOTransportZlib_deflateInit2(z_streamp stream, int level, int method, int windowBits,
  20. int memLevel, int strategy) {
  21. return deflateInit2(stream, level, method, windowBits, memLevel, strategy);
  22. }
  23. static inline unsigned long CGRPCNIOTransportZlib_deflateBound(z_streamp strm, unsigned long sourceLen) {
  24. return deflateBound(strm, sourceLen);
  25. }
  26. static inline int CGRPCNIOTransportZlib_deflate(z_streamp strm, int flush) {
  27. return deflate(strm, flush);
  28. }
  29. static inline int CGRPCNIOTransportZlib_deflateReset(z_streamp strm) {
  30. return deflateReset(strm);
  31. }
  32. static inline int CGRPCNIOTransportZlib_deflateEnd(z_streamp strm) {
  33. return deflateEnd(strm);
  34. }
  35. static inline int CGRPCNIOTransportZlib_inflateInit2(z_streamp stream, int windowBits) {
  36. return inflateInit2(stream, windowBits);
  37. }
  38. static inline int CGRPCNIOTransportZlib_inflate(z_streamp strm, int flush) {
  39. return inflate(strm, flush);
  40. }
  41. static inline int CGRPCNIOTransportZlib_inflateReset(z_streamp strm) {
  42. return inflateReset(strm);
  43. }
  44. static inline int CGRPCNIOTransportZlib_inflateEnd(z_streamp strm) {
  45. return inflateEnd(strm);
  46. }
  47. static inline Bytef *CGRPCNIOTransportZlib_castVoidToBytefPointer(void *in) {
  48. return (Bytef *) in;
  49. }
  50. #endif // C_GRPC_ZLIB_H_