'Returns data back to the HTTP post request.'

def read(self, blocksize):

    if self.end_of_stream:
        return ''
    if self.read_header:
        ret = self.header.read(blocksize)
        if ret:
            return ret
        self.read_header = False
    blocksize -= sutils.SIZE_PACKER.size
    while ((not self.buffered) and (not self.end_of_file)):
        raw = self.fp.read(blocksize)
        if (not raw):
            self.end_of_file = True
            self.buffered += self.compressor.flush()
            break
        compressed = self.compressor.compress(raw)
        if compressed:
            self.buffered += compressed
    if (len(self.buffered) > blocksize):
        ret = self.buffered[:blocksize]
        self.buffered = self.buffered[blocksize:]
    else:
        ret = self.buffered
        self.buffered = ''
    if (not ret):
        self.end_of_stream = True
    return (sutils.SIZE_PACKER.pack(len(ret)) + ret)
