According to the zlib manual, when you Compress, the destination buffer must have size at least src + .1%*src + 12. This function helps you calculate that. Augment this to account for a potential gzip header and footer, plus a few bytes of slack.
| 363 | // helps you calculate that. Augment this to account for a potential |
| 364 | // gzip header and footer, plus a few bytes of slack. |
| 365 | static int MinCompressbufSize(int uncompress_size) { |
| 366 | return uncompress_size + uncompress_size/1000 + 40; |
| 367 | } |
| 368 | |
| 369 | // Compresses the source buffer into the destination buffer. |
| 370 | // sourceLen is the byte length of the source buffer. |
nothing calls this directly
no outgoing calls
no test coverage detected