~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chunk_writer.py

  • Committer: John Arbash Meinel
  • Date: 2008-08-23 00:50:56 UTC
  • mto: This revision was merged to the branch mainline in revision 3653.
  • Revision ID: john@arbash-meinel.com-20080823005056-r2ccmi0zrbuvj0mb
Only Z_SYNC_FLUSH when we have extra bytes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
                append(out)
139
139
        if extra_bytes:
140
140
            out = compress(extra_bytes)
141
 
            if out:
142
 
                append(out)
143
 
        append(compressor.flush(Z_SYNC_FLUSH))
 
141
            out += compressor.flush(Z_SYNC_FLUSH)
 
142
            append(out)
144
143
        bytes_out_len = sum(map(len, bytes_out))
145
144
        return bytes_out, bytes_out_len, compressor
146
145