g1mv / density

Superfast compression library
Apache License 2.0
1.02k stars 48 forks source link

macro or routine or algorithm to know maximum size of compressed block from input size. #48

Closed mckellyln closed 9 years ago

mckellyln commented 9 years ago

If there is a formula we could use for determining the maximum size of a compressed block based on its input size that would be of help for setting up buffers and/or when to call the compress function. Most other compression packages have this feature and it can be a benefit.

g1mv commented 9 years ago

Implemented in bf87ab2e8484de7ec260dd1d359fd19b9270e3b2 with density_buffer_compress_safe_size() and density_buffer_decompress_safe_size()