'Write an archive member from a file like object.
Args:
src_fd: A file like object, must support seek(), tell(), read().
arcname: The name in the archive this should take.
st: A stat object to be used for setting headers.
Raises:
ValueError: If st is omitted.
ArchiveAlreadyClosedError: If the archive was already closed.
IOError: if file size reported in st is different from the one that
was actually read from the src_fd.
Yields:
Chunks of binary data.'

def WriteFromFD(self, src_fd, arcname=None, st=None):

    (yield self.WriteFileHeader(arcname=arcname, st=st))
    while 1:
        buf = src_fd.read((1024 * 1024))
        if (not buf):
            break
        (yield self.WriteFileChunk(buf))
    (yield self.WriteFileFooter())
