Lines Matching refs:complen
40 my_bool my_compress(uchar *packet, size_t *len, size_t *complen) in my_compress() argument
45 *complen=0; in my_compress()
50 uchar *compbuf=my_compress_alloc(packet,len,complen); in my_compress()
52 DBUG_RETURN(*complen ? 0 : 1); in my_compress()
130 uchar *my_compress_alloc(const uchar *packet, size_t *len, size_t *complen) in my_compress_alloc() argument
134 *complen= *len * 120 / 100 + 12; in my_compress_alloc()
136 if (!(compbuf= (uchar *) my_malloc(*complen, MYF(MY_WME)))) in my_compress_alloc()
139 res= my_compress_buffer(compbuf, complen, packet, *len); in my_compress_alloc()
147 if (*complen >= *len) in my_compress_alloc()
149 *complen= 0; in my_compress_alloc()
155 swap_variables(size_t, *len, *complen); in my_compress_alloc()
176 my_bool my_uncompress(uchar *packet, size_t len, size_t *complen) in my_uncompress() argument
181 if (*complen) /* If compressed */ in my_uncompress()
183 uchar *compbuf= (uchar *) my_malloc(*complen,MYF(MY_WME)); in my_uncompress()
188 tmp_complen= (uLongf) *complen; in my_uncompress()
191 *complen= tmp_complen; in my_uncompress()
198 memcpy(packet, compbuf, *complen); in my_uncompress()
202 *complen= len; in my_uncompress()