key/value store optimized for disk storage
Steve Howell
showell30 at yahoo.com
Mon May 7 12:39:05 EDT 2012
On May 6, 10:21 pm, John Nagle <na... at animats.com> wrote:
> On 5/4/2012 12:14 AM, Steve Howell wrote:
>
> > On May 3, 11:59 pm, Paul Rubin<no.em... at nospam.invalid> wrote:
> >> Steve Howell<showel... at yahoo.com> writes:
> >>> compressor = zlib.compressobj()
> >>> s = compressor.compress("foobar")
> >>> s += compressor.flush(zlib.Z_SYNC_FLUSH)
>
> >>> s_start = s
> >>> compressor2 = compressor.copy()
>
> That's awful. There's no point in compressing six characters
> with zlib. Zlib has a minimum overhead of 11 bytes. You just
> made the data bigger.
>
The actual strings that I'm compressing are much longer than six
characters. Obviously, "foobar" was just for example purposes.
More information about the Python-list
mailing list