> Hello
> 
> I've a 9p server implemented using lib9p which serves decoded files, for 
> example, i have a base64 encoded file i want to read, but i want to decode it 
> at the same time the client reads. Then i need to save two offsets, the one 
> sent to the client corresponds to the decoded data, and i need other which 
> correspond to the original data. (base64 is an example, rfc2047 codification 
> is the main issue)
> 
> If i save the offset adjustment in f->aux or simmilar, i can calculate the 
> real file offset on the next T-reads, but that will only work if one client 
> reads it at one time. 
> 
> could that value be saved for each session?
> 
> i would love to hear from other's experiences,

i've been spending a little time with upas/fs.  i don't think that in
general one can get by parsing part of an email, unless that part
happens to be top-level headers.  there are more transforms than
you've mentioned.  apple mail loves to put nulls in html email, for
example.

traditional mbox format is problematic, too.

if you wish to control memory usage (which is a serious problem for
upas/fs), i think the way to go is a cache with reference counting.

the stuff i have isn't ready for prime time, but it's coming along
nicely.

by the way, does anyone know the rational for the date on the
unix "From " line?  upas sets it to the date the message is originally
delivered to the inbox.  moving it from the inbox to another folder
does not change the date.

- erik


Reply via email to