'Writes at most one chunk of data.'

def _WritePartial(self, data):

    chunk = (self.offset / self.chunksize)
    chunk_offset = (self.offset % self.chunksize)
    data = utils.SmartStr(data)
    available_to_write = min(len(data), (self.chunksize - chunk_offset))
    fd = self._GetChunkForWriting(chunk)
    fd.seek(chunk_offset)
    fd.write(data[:available_to_write])
    self.offset += available_to_write
    return data[available_to_write:]
