require 'zlib'
file = 'compressed.gz'
Zlib::GzipWriter.open(file) do |gzip|
gzip << "this is a test."
gzip.close
end
open('compressed.gz', 'wb') do |file|
gzip = Zlib::GzipWriter.new(file)
gzip << "this is a test."
gzip.close
end
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
暗影19931011