# ZLIB::GzipWriter - Strange file encoding?

**URL:** <https://www.ruby-forum.com/t/zlib-gzipwriter-strange-file-encoding/55083>\
**Category:** Rails\
**Created:** [March 16, 2006, 10:00pm UTC](https://www.ruby-forum.com/t/zlib-gzipwriter-strange-file-encoding/55083 "2006-03-16T22:00:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickstone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Post date:** [March 16, 2006, 10:00pm UTC](https://www.ruby-forum.com/t/zlib-gzipwriter-strange-file-encoding/55083/1 "2006-03-16T22:00:08Z")

</div>

Hey Folks,

I have this code:

Zlib::GzipWriter.open(“file.gz”) do |gz|  
gz.write(File.read(“file.csv”))  
end

Unfortunately this file doesn’t want to open correctly in UltimateZip.  
It shows a file inside, but doesn’t allow you to extract it.

Am I missing something here? Seems pretty cut and dry…

* * *

## Brian C.
