Dmytro Bablinyuk
2005-09-06 06:22:20 UTC
Hi,
Ruby version 1.8.2 (windows XP)
RubyZip version 0.5.11
I am trying to zip a binary file.
For example
Zip::ZipFile.open(target, Zip::ZipFile::CREATE) { |zipfile|
zipfile.dir.mkdir('bin')
zipfile.file.open('bin\eclipse.exe', 'w'){ |f|
f.write(File.open('bin\eclipse.exe', 'rb').read)
}
}
This zips the file but file has only first 163 bytes written (original
file size ~100K)
What I am doing wrong?
Thank you
Ruby version 1.8.2 (windows XP)
RubyZip version 0.5.11
I am trying to zip a binary file.
For example
Zip::ZipFile.open(target, Zip::ZipFile::CREATE) { |zipfile|
zipfile.dir.mkdir('bin')
zipfile.file.open('bin\eclipse.exe', 'w'){ |f|
f.write(File.open('bin\eclipse.exe', 'rb').read)
}
}
This zips the file but file has only first 163 bytes written (original
file size ~100K)
What I am doing wrong?
Thank you