]> arthur.barton.de Git - bup.git/commit
hashsplit.py: simplify code and fix BLOB_MAX handling.
authorAvery Pennarun <apenwarr@gmail.com>
Thu, 17 Feb 2011 09:56:31 +0000 (01:56 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 20 Feb 2011 05:38:28 +0000 (21:38 -0800)
commit7976e29118c97dd1f8dc3a733e8a74f6a95c0431
treea895d2e2a6f1cade40d63a73927352f168066d7a
parent5a9bc0a6c31d2d0824261685b6ce7a359729436d
hashsplit.py: simplify code and fix BLOB_MAX handling.

This reduces the number of lines without removing functionality.  I renamed
a few constants to make more sense.

The only functional change is that BLOB_MAX is now an actual maximum instead
of a variable number depending on buf.used().  Previously, it might have
been as large as BLOB_READ_SIZE = 1MB, which is much larger than BLOB_MAX =
16k.  Now BLOB_MAX is actually the max.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/hashsplit.py