1414 * limitations under the License.
1515 */
1616
17- internal import CGRPCZlib
17+ internal import CGRPCNIOTransportZlib
1818internal import GRPCCore
1919internal import NIOCore
2020
@@ -152,7 +152,7 @@ extension UnsafeMutablePointer<z_stream> {
152152 self . pointee. zalloc = nil
153153 self . pointee. opaque = nil
154154
155- let rc = CGRPCZlib_inflateInit2 ( self , windowBits)
155+ let rc = CGRPCNIOTransportZlib_inflateInit2 ( self , windowBits)
156156 // Possible return codes:
157157 // - Z_OK
158158 // - Z_MEM_ERROR: not enough memory
@@ -163,7 +163,7 @@ extension UnsafeMutablePointer<z_stream> {
163163 }
164164
165165 func inflateReset( ) throws {
166- let rc = CGRPCZlib_inflateReset ( self )
166+ let rc = CGRPCNIOTransportZlib_inflateReset ( self )
167167
168168 // Possible return codes:
169169 // - Z_OK
@@ -179,15 +179,15 @@ extension UnsafeMutablePointer<z_stream> {
179179 }
180180
181181 func inflateEnd( ) {
182- _ = CGRPCZlib_inflateEnd ( self )
182+ _ = CGRPCNIOTransportZlib_inflateEnd ( self )
183183 }
184184
185185 func deflateInit( windowBits: Int32) {
186186 self . pointee. zfree = nil
187187 self . pointee. zalloc = nil
188188 self . pointee. opaque = nil
189189
190- let rc = CGRPCZlib_deflateInit2 (
190+ let rc = CGRPCNIOTransportZlib_deflateInit2 (
191191 self ,
192192 Z_DEFAULT_COMPRESSION, // compression level
193193 Z_DEFLATED, // compression method (this must be Z_DEFLATED)
@@ -207,7 +207,7 @@ extension UnsafeMutablePointer<z_stream> {
207207 }
208208
209209 func deflateReset( ) throws {
210- let rc = CGRPCZlib_deflateReset ( self )
210+ let rc = CGRPCNIOTransportZlib_deflateReset ( self )
211211
212212 // Possible return codes:
213213 // - Z_OK
@@ -223,11 +223,11 @@ extension UnsafeMutablePointer<z_stream> {
223223 }
224224
225225 func deflateEnd( ) {
226- _ = CGRPCZlib_deflateEnd ( self )
226+ _ = CGRPCNIOTransportZlib_deflateEnd ( self )
227227 }
228228
229229 func deflateBound( inputBytes: Int ) -> Int {
230- let bound = CGRPCZlib_deflateBound ( self , UInt ( inputBytes) )
230+ let bound = CGRPCNIOTransportZlib_deflateBound ( self , UInt ( inputBytes) )
231231 return Int ( bound)
232232 }
233233
@@ -243,7 +243,7 @@ extension UnsafeMutablePointer<z_stream> {
243243
244244 func setNextInputBuffer( _ buffer: UnsafeMutableRawBufferPointer ? ) {
245245 if let buffer = buffer, let baseAddress = buffer. baseAddress {
246- self . pointee. next_in = CGRPCZlib_castVoidToBytefPointer ( baseAddress)
246+ self . pointee. next_in = CGRPCNIOTransportZlib_castVoidToBytefPointer ( baseAddress)
247247 self . pointee. avail_in = UInt32 ( buffer. count)
248248 } else {
249249 self . pointee. next_in = nil
@@ -263,7 +263,7 @@ extension UnsafeMutablePointer<z_stream> {
263263
264264 func setNextOutputBuffer( _ buffer: UnsafeMutableRawBufferPointer ? ) {
265265 if let buffer = buffer, let baseAddress = buffer. baseAddress {
266- self . pointee. next_out = CGRPCZlib_castVoidToBytefPointer ( baseAddress)
266+ self . pointee. next_out = CGRPCNIOTransportZlib_castVoidToBytefPointer ( baseAddress)
267267 self . pointee. avail_out = UInt32 ( buffer. count)
268268 } else {
269269 self . pointee. next_out = nil
@@ -339,7 +339,7 @@ extension UnsafeMutablePointer<z_stream> {
339339 //
340340 // Note that Z_OK is not okay here since we always flush with Z_FINISH and therefore
341341 // use Z_STREAM_END as our success criteria.
342- let rc = CGRPCZlib_inflate ( self , Z_FINISH)
342+ let rc = CGRPCNIOTransportZlib_inflate ( self , Z_FINISH)
343343 switch rc {
344344 case Z_STREAM_END:
345345 finished = true
@@ -392,7 +392,7 @@ extension UnsafeMutablePointer<z_stream> {
392392 return try output. writeWithUnsafeMutableBytes ( minimumWritableBytes: upperBound) { output in
393393 self . setNextOutputBuffer ( output)
394394
395- let rc = CGRPCZlib_deflate ( self , Z_FINISH)
395+ let rc = CGRPCNIOTransportZlib_deflate ( self , Z_FINISH)
396396
397397 // Possible return codes:
398398 // - Z_OK: some progress has been made
0 commit comments