[erlang-questions] zlib compress and uncompress on bit string << 255, 3:2 >>.
Thu Oct 28 02:54:01 CEST 2010
> Hi -
> I am using zlib:compress and uncompress on bitstring.
> The expression zlib:uncompress( zlib:compress ( << 255, 3:2 >> )) =:=
> << 255, 3:2 >> is evaluating to false.
> zlib:uncompress( zlib:compress ( << 255, 3:2 >> )).
> << << X >> || << X:1 >> <= <<"ÿ">> >>.
> << << X >> || << X:1 >> <= << 255, 3:2 >> >>.
> Is this a bug with the zlib library or am I missing something basic here?
What exactly makes you consider it a bug?
The manual clearly mentions that zlib:uncompress/1 returns a binary().
Why do you expect that equality of this term with a bitstring() which is
not a binary() should succeed?
More information about the erlang-questions