我想从elixir代码编写gzip文件.
我试图遵循代码,但它不能很好地工作.
io_device = File.open!("/path/to/file.gzip", [:write, :compressed])
IO.write(io_device, "test")
IO.write返回:ok,但是,/path/to/file.gzip是空的.
我怎么写gzip文件?
你也可以一步完成整个事情:
File.write "/path/to/file.gzip", "test", [:compressed]