Attachment size changing

G

Guest

Hello,

I noticed the following behavior and wanted to see if anyone knows how it
can be prevented:

If I send a Word 2003 document as a file attachment in an Outlook 2003
email, the file size in bytes of the file the recipient receives differs from
the file size of the file I originally attached to the email. For example, I
created a word doc of 24,064 bytes and sent it to someone. The recipient
received it as 26,624 bytes. I then went into my Sent Items and the file
there was 26,624 bytes too. Outlook appears to be adding a Summary
Information section from looking at the files in a hex editor.

Does anyone know why this is happening or how to turn it off? I have the
option "Add properties to attachments to enable Reply with Changes" unchecked.

Thanks,
Ryan
 
G

Guest

Ryan said:
Hello,

I noticed the following behavior and wanted to see if anyone knows how
it
can be prevented:

If I send a Word 2003 document as a file attachment in an Outlook 2003
email, the file size in bytes of the file the recipient receives
differs from
the file size of the file I originally attached to the email. For
example, I
created a word doc of 24,064 bytes and sent it to someone. The
recipient
received it as 26,624 bytes. I then went into my Sent Items and the
file
there was 26,624 bytes too. Outlook appears to be adding a Summary
Information section from looking at the files in a hex editor.

Does anyone know why this is happening or how to turn it off? I have
the
option "Add properties to attachments to enable Reply with Changes"
unchecked.

Thanks,
Ryan


Because you are NOT sending the document to your recipient. Your
recipient does not get a .doc file floating somewhere out on the
Internet. You attaching a file means that file has to get ENCODED and
within the body of your message. The recipient then has to decode that
content. Encoding adds more space to a file. E-mail is not nor ever
was designed to be a file transfer medium. Attachments have to be
encoded to provide for inclusion of that content within the body of your
e-mail. Send yourself a .doc file and then open it using Outlook
Express (because Outlook won't show you the true raw mode of your
message). In OE and after getting the message, select the item and hit
Ctrl+F3 to see the raw mode for your e-mail. Notice there is no link or
some floating file lingering around for that e-mail. The attached file
is *IN* your e-mail message as a uuencoded or MIME encoded part. That
encoding is NOT binary. It is text because that was what NNTP (network
news transfer protocol) was designed to handle. Converting binary to
text make the file increase in size.

A file of N bytes when attached to an e-mail results in encoding that
file into a text stream that gets included in the *body* of your
message, and the size of that encoded file when converted to a text
stream will be significantly higher than the N bytes you see in Explorer
(which may have only been for the used space within the file and not the
total file space, including the slack space for it). Expect your e-mail
to bloom up to 30% more than the size of the attached file.
 
G

Guest

Hi Vanguard,

Thanks for the reply back. In this case, I actually am saving the file to
my hard disk rather than looking at it in a Outlook window (where I know the
file sizes might be larger because of encoding). I got those file sizes in
my original note when saving the file on my desktop and looking at the file
size by right-clicking on the file and choosing properties and looking at the
"Size" line as opposed to the "Size on disk" line. The size is increasing in
the attachment I sent. Also, additionally this file size increase only
happens with Office 2003 attachments (word/excel/powerpoint). It doesn't
happen on other file types.

Thanks,
Ryan
 
P

Peter Foldes

Apart from Vanguards answer are you also sending it in HTML format. This can
also add a few bytes to the total size of the email
 
G

Guest

No, I'm sending text emails. Also, I'm looking at the exact file size of the
attachment (saved to my desktop) rather than looking at the size in Outlook.
 
G

Guest

Ryan said:
Hi Vanguard,

Thanks for the reply back. In this case, I actually am saving the
file to
my hard disk rather than looking at it in a Outlook window (where I
know the
file sizes might be larger because of encoding). I got those file
sizes in
my original note when saving the file on my desktop and looking at the
file
size by right-clicking on the file and choosing properties and looking
at the
"Size" line as opposed to the "Size on disk" line. The size is
increasing in
the attachment I sent. Also, additionally this file size increase
only
happens with Office 2003 attachments (word/excel/powerpoint). It
doesn't
happen on other file types.

Thanks,
Ryan


The behavior seems peculiar to Office files (and maybe only to .doc
files as I didn't test with Excel or Powerpoint files). When sending
the file, Outlook does re-add the document summary info at the end of
the file BEFORE it is sent (so you'll see it is already bigger in your
Sent Items folder). Even if you use the Office add-in to remove hidden
metadata from your .doc file, this doesn't change Outlook's behavior
(which is also present back in Outlook 2002).

In Explorer, right-click on a file, select Properties, and you'll see a
Summary properties panel where you can add info to a file. I suspect
this is the info that is getting added to the file when it gets read.
I've used the "Remove Hidden Data" Office plug-in so that in-document
metadata was mostly gone but that did not significantly change the size
of the .doc file and still did not stop the file from growing by about
3K when using Outlook to yank a copy of the file to attach to an e-mail.

When you are in Explorer and add text into the fields in the Summary
property panel of a file, the size of the file does not increase. This
is metadata assigned to the file. But when you attach the file to send
it as an attachment, the recipient won't have your operating system on
your hard disk to get that metadata, so Outlook adds it to the end of
the file so it will be there when you save the file. However, it got
carried along as content within the file itself (as there is no other
way to transport it). While you don't see it as *in* the file (when you
are editing it within Word), it is still nonetheless a component or
property of the file so Outlook is including it. Your local file system
is retaining the metadata and associating it with that file, but
obviously there will be no such control when you e-mail that file so
that data gets included with the file when it gets e-mailed.

You can easily test this. Right-click on your .doc file (without Word
open), right-click, Properties, Summary, and add some special text in
those fields that you can easily identify later were specifically added
for this test. They were probably all blank before, anyway. Notice the
size of the file has not changed although you might have added lots of
text in these info fields. Now send that file via e-mail. Notice the
saved file is bigger than before. If you use the hex editor to look at
the end of the file, you'll see the "DocumentationSummaryInformation"
section which contains all those special text strings that you added
(plus you'll see those text strings when right-clicking on the file,
Properties, and under Summary). The metadata (which is not in the file)
got carried along when you attached it to an e-mail.
 
G

Guest

Thanks for your detailed reply. This is exactly what is happening to me.
And yes, it also happens on Excel and PowerPoint files. That same summary
information section gets added at the bottom. Any ideas on how to prevent it
from happening? The reason I noticed this is that I need to guarantee that
the files being received are exactly the same as what I'm sending - and
because Outlook is physically changing my files, the md5 checksums are
failing between the sent file and the received file. So I have no way to
guarantee that the receiver is receiving the same file I'm sending - and in
this case, he really is receiving a different file because the size of the
files in bytes is different, which is entirely not expected.
 
G

Guest

Ryan said:
Thanks for your detailed reply. This is exactly what is happening to
me.
And yes, it also happens on Excel and PowerPoint files. That same
summary
information section gets added at the bottom. Any ideas on how to
prevent it
from happening? The reason I noticed this is that I need to guarantee
that
the files being received are exactly the same as what I'm sending -
and
because Outlook is physically changing my files, the md5 checksums are
failing between the sent file and the received file. So I have no way
to
guarantee that the receiver is receiving the same file I'm sending -
and in
this case, he really is receiving a different file because the size of
the
files in bytes is different, which is entirely not expected.


Compress it into a .zip file. Or provide a link to the file from where
the recipient can download it (i.e., instead of bulking up your e-mail
with the .doc file, let the recipient download it at will).
 
G

Guest

Yes, those are definitely both possibilities, but I really would like to try
to find out the reason why this is happening - or more specifically how to
turn it off - because I don't think Outlook should be changing the file
silently without telling me that it's doing it and without giving me an
option to not do it.
 
G

Guest

Ryan said:
Yes, those are definitely both possibilities, but I really would like
to try
to find out the reason why this is happening - or more specifically
how to
turn it off - because I don't think Outlook should be changing the
file
silently without telling me that it's doing it and without giving me
an
option to not do it.


Are you using NTFS? Got a FAT32 partition? Maybe a FAT32 partition
doesn't add metadata to its files (i.e., if there is no metadata to add
then presumably Outlook won't try to add any).
 
G

Guest

I've only tried it on NTFS partitions so far. I can check to see if we have
any FAT32 partitions in our office tomorrow - but also, if it were
NTFS-related, wouldn't it do it on all file types, not just office documents?
 

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

Top