src/wolfSSL/src/internal.c
static int myCompress(WOLFSSL* ssl, byte* in, int inSz, byte* out, int outSz)
    {
        int    err;
        int    currTotal = (int)ssl->c_stream.total_out;

        ssl->c_stream.next_in   = in;
        ssl->c_stream.avail_in  = inSz;
        ssl->c_stream.next_out  = out;
        ssl->c_stream.avail_out = outSz;

        err = deflate(&ssl->c_stream, Z_SYNC_FLUSH);
        if (err != Z_OK && err != Z_STREAM_END) return ZLIB_COMPRESS_ERROR;

        return (int)ssl->c_stream.total_out - currTotal;
    }
/* compress in to out, return out size or error */
compress in to out, return out size or error
compress in to out return out size or error
static int myCompress(WOLFSSL* ssl, byte* in, int inSz, byte* out, int outSz)
    {
        int    err;
        int    currTotal = (int)ssl->c_stream.total_out;
        ssl->c_stream.next_in   = in;
        ssl->c_stream.avail_in  = inSz;
        ssl->c_stream.next_out  = out;
        ssl->c_stream.avail_out = outSz;
        err = deflate(&ssl->c_stream, Z_SYNC_FLUSH);
        if (err != Z_OK && err != Z_STREAM_END) return ZLIB_COMPRESS_ERROR;
        return (int)ssl->c_stream.total_out - currTotal;
    }
static int myCompress ( WOLFSSL * ssl , byte * in , int inSz , byte * out , int outSz ) { int err ; int currTotal = ( int ) ssl -> c_stream . total_out ; ssl -> c_stream . next_in = in ; ssl -> c_stream . avail_in = inSz ; ssl -> c_stream . next_out = out ; ssl -> c_stream . avail_out = outSz ; err = deflate ( & ssl -> c_stream , Z_SYNC_FLUSH ) ; if ( err != Z_OK && err != Z_STREAM_END ) return ZLIB_COMPRESS_ERROR ; return ( int ) ssl -> c_stream . total_out - currTotal ; }
compress in to out, return out size or error
compress in to out return out size or error