Tweaked chunk encoding API.  Need to figure out errors at some point...