[erlang-questions] zlib: how many bytes were used during the uncompression (one call of zlib:inflate/2)
CGS
cgsmcmlxxv@REDACTED
Fri Aug 3 13:56:42 CEST 2012
Hi,
The reason you get no answer is because nobody can know the answer. And the
reason no one can know the answer is that you haven't provided any
information about what you have as compressed data. For example, a simple
text can be compressed to in between 30% and 80% from its decompressed size
(these numbers are not official, just examples), so, when deflated, the
size can reach from 1.25 to 3.33 times the size of compressed text size.
>From my own experience (these are simple observations only), the range of
compression is in between 10% and 100% (no compression could be applied)
from the uncompressed data size. That means, the range of deflated data
size is from 1 to 10 times the size of compressed data. Again, these
numbers are for the sake of discussion and may not apply for your case.
You can find more info about zlib from:
http://zlib.net/
http://en.wikipedia.org/wiki/Zlib
http://en.wikipedia.org/wiki/LZ77 (LZ77 only)
CGS
On Thu, Aug 2, 2012 at 11:18 PM, Zabrane Mickael <zabrane3@REDACTED> wrote:
> Need help on this please!
>
> On Aug 2, 2012, at 5:19 PM, Zabrane Mickael wrote:
>
> > Hi guys,
> >
> > I'm playing a bit with the zlib module today.
> >
> > Let say I wan to uncompress a GzipData binary with zlib:inflate/2:
> > InflatedData = zlib:inflate(Z, GzipData).
> >
> > In case of success, I want to know how many bytes from GzipData were used
> > internally to get the InflatedData?
> >
> > Regards,
> > Zabrane
> >
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120803/7b479743/attachment.htm>
More information about the erlang-questions
mailing list