Using Zlib

Vladimir Sekissov svg@REDACTED
Wed Jun 19 18:25:12 CEST 2002

Good day, Willem,

willem> Willem Broekema wrote:
willem> > I assume Zlib is used in the Erlang runtime, but not available in Erlang 
willem> > programs?

I've looked around the code and it seemed they could use compressed files with
`compressed' flag.

So I tried:

15> {ok, FD} = file:open("/var/tmp/test", [write, compressed]).
16> io:put_chars(F4, "Test, Test, Test").
17> file:close(FD).
29> file:read(FD1, 16).
{ok,"Test, Test, Test"}
30> file:close(FD1).

When looked in shell:

$ file /var/tmp/test
test: gzip compressed data, deflated, last modified: Thu Jan  1
05:00:00 1970, os: Unix 

Best Regards,
Vladimir Sekissov

More information about the erlang-questions mailing list