[haiku-development] Re: [GSoC proposal] IMAP FS - A few queries

  • From: Truls Becken <truls.becken@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 14 Apr 2011 22:56:14 +0200

On Thu, Apr 14, 2011 at 22:33, Ingo Weinhold wrote:

>>> For example, a two part message consisting of a text and a
>>>          BASE64-encoded text attachment can have a body structure of:
>>>          (("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 1152
>>>          23)("TEXT" "PLAIN" ("CHARSET" "US-ASCII" "NAME" "cc.diff")
>>>          "<960723163407.20117h@xxxxxxxxxxxxxxxxxx>" "Compiler diff"
>>>          "BASE64" 4554 73) "MIXED")
>>>
>> Forgot to mention "1152" and "4554" are octet offsets
>
> Nope, they are sizes. Which is why I asked. Without having exact offsets
> the file system user can only guess where to read in the mail file to get a
> certain body part.

Can the offsets be computed from the sizes? You already downloaded the
headers, right, so if that was e.g. 735 bytes, you have:

Headers:        1 -  735
Plain text:   736 - 1887
Attachment:  1888 - 6441

-Truls

Other related posts: