File size descrepancy via IO#write or IO#syswrite

Z

Zach Dennis

I have a gzipped xml file, which I get from a Java Client on a Windows
machine. The file size is 9934 bytes. I send a MD5 sum with my transmission.

I send this file over the network to a Linux server. I receive 9934
bytes (i run MD5.hexdigest to make sure the received file is the same as
the one sent).

When I write the file to disk the file on disk has 11214 bytes to it.

Ruby tells me that it wrote 9934 bytes, but the filesystem is showing me
different.

Any clues? Thanks,

Zach
 
Z

Zach Dennis

Zach said:
I have a gzipped xml file, which I get from a Java Client on a Windows
machine. The file size is 9934 bytes. I send a MD5 sum with my
transmission.

I send this file over the network to a Linux server. I receive 9934
bytes (i run MD5.hexdigest to make sure the received file is the same as
the one sent).

When I write the file to disk the file on disk has 11214 bytes to it.

Ruby tells me that it wrote 9934 bytes, but the filesystem is showing me
different.

Any clues? Thanks,

After restarting the ruby process, the problem still occurred. After
rebooting the linux server, the problem went away.

Zach
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top