MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / MinCompressbufSize

Method MinCompressbufSize

Libraries/snappy/snappy-test.h:365–367  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected