| 1602 | } |
| 1603 | |
| 1604 | mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len) { |
| 1605 | (void)pStream; |
| 1606 | // This is really over conservative. (And lame, but it's actually pretty |
| 1607 | // tricky to compute a true upper bound given the way tdefl's blocking works.) |
| 1608 | return MZ_MAX(128 + (source_len * 110) / 100, |
| 1609 | 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5); |
| 1610 | } |
| 1611 | |
| 1612 | int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, |
| 1613 | const unsigned char *pSource, mz_ulong source_len, int level) { |