> > then split_any() could just tell it how much to read, and this wouldn't be 
> > as much
> > of an issue.  Alternately, split_any() could just keep track of how much 
> > was read
> > and loop through an arbitrary number of reads, incrementing until the totals
> > matched.  That's the least intrusive approach.  I'll implement it if people 
> > agree. 
> > Thoughts?
> 
> This is the approach that I had in mind. It is quite simple, actually: loop
> until the read() returns a length such that point <= length. If point >
> length, then subtract the length from point, and read the next bucket.
> 
> Note that *no* split should occur when point == length.

This is different than all of the other split functions.  If point ==
length, then we get one bucket with length == point and one bucket with
length == 0.  This makes the code much easier to deal with, because it
removes special cases.

Ryan


_______________________________________________________________________________
Ryan Bloom                              [EMAIL PROTECTED]
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Reply via email to