Rev 2763: * The compression used within the bzr repository has changed from zlib in http://people.ubuntu.com/~robertc/baz2.0/knits

Robert Collins robertc at robertcollins.net
Fri Aug 31 00:35:55 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/knits

------------------------------------------------------------
revno: 2763
revision-id: robertc at robertcollins.net-20070830233527-32eufgwtk781yn71
parent: pqm at pqm.ubuntu.com-20070828155202-pcq659o80mx4f4p3
committer: Robert Collins <robertc at robertcollins.net>
branch nick: knits
timestamp: Fri 2007-08-31 09:35:27 +1000
message:
  * The compression used within the bzr repository has changed from zlib
    level 9 to the zlib default level. This improves commit performance with
    only a small increase in space used (and in some cases a reduction in
    space). (Robert Collins)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
=== modified file 'NEWS'
--- a/NEWS	2007-08-28 14:35:10 +0000
+++ b/NEWS	2007-08-30 23:35:27 +0000
@@ -72,6 +72,11 @@
     * Help on debug flags is now included in ``help global-options``.
       (Daniel Watkins, #124853)
 
+    * The compression used within the bzr repository has changed from zlib
+      level 9 to the zlib default level. This improves commit performance with
+      only a small increase in space used (and in some cases a reduction in
+      space). (Robert Collins)
+
   API BREAKS:
 
    * ``Branch.append_revision`` is removed altogether; please use 

=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py	2007-08-24 02:15:47 +0000
+++ b/bzrlib/knit.py	2007-08-30 23:35:27 +0000
@@ -68,6 +68,7 @@
 import os
 import sys
 import warnings
+from zlib import Z_DEFAULT_COMPRESSION
 
 import bzrlib
 from bzrlib.lazy_import import lazy_import
@@ -1880,7 +1881,8 @@
         :return: (len, a StringIO instance with the raw data ready to read.)
         """
         sio = StringIO()
-        data_file = GzipFile(None, mode='wb', fileobj=sio)
+        data_file = GzipFile(None, mode='wb', fileobj=sio,
+            compresslevel=Z_DEFAULT_COMPRESSION)
 
         assert isinstance(version_id, str)
         data_file.writelines(chain(



More information about the bazaar-commits mailing list