[erlang-questions] file:open/2: 'compressed' doesn't like like 'raw' mode

Zabrane Mickael zabrane3@REDACTED
Wed Aug 1 00:14:16 CEST 2012


Hi,

This is OK:
{ok, H} = file:open("foo.gz", [read, compressed]).
{ok, _} = file:pread(H, 0, 4096).


And this is not:
{ok, H} = file:open("foo.gz", [read, raw, compressed]).
file:pread(H, 0, 4096).
{error,ebadf}

Why? The doc doesn't warn about this limitation.

Regards,
Zabrane




More information about the erlang-questions mailing list