From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8a716187cfbf87e6d99d02a1eebf9725@quanstro.net> To: 9fans@9fans.net From: erik quanstrom Date: Wed, 11 Jun 2008 19:44:21 -0400 In-Reply-To: <0c2d4885e85a65f8cb0fba1ed4d12336@9grid.es> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] store 9p session-only values using lib9p Topicbox-Message-UUID: bb22c40e-ead3-11e9-9d60-3106f5b1d025 > 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