diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2009-08-07 05:52:18 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2009-08-07 05:54:36 (GMT) |
commit | 6c0923428963e3a9135015b32f736e38849f1ae0 (patch) | |
tree | c7d70fb338f90b2ac44a202f27e2b0a382db51fa /FuseArchive | |
parent | 1634757df06adefdd30975839d60f03618916fd0 (diff) | |
download | fusearchive-6c0923428963e3a9135015b32f736e38849f1ae0.zip fusearchive-6c0923428963e3a9135015b32f736e38849f1ae0.tar.gz fusearchive-6c0923428963e3a9135015b32f736e38849f1ae0.tar.bz2 |
Don't gzip serialized data anymore since it's basically just a single key
in the physical file, and the chunked data that has the actual file chunk
contents is already compressed. Compressing the single key data in the
tree actually makes it bigger (50+ bytes instead of 34) which can be seen
by gzipping them manually to test
Diffstat (limited to 'FuseArchive')
-rw-r--r-- | FuseArchive/Serializer.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/FuseArchive/Serializer.py b/FuseArchive/Serializer.py index 621d90a..eb14cec 100644 --- a/FuseArchive/Serializer.py +++ b/FuseArchive/Serializer.py @@ -15,10 +15,10 @@ class Serializer: logging.debug( "Going to serialize %s to %s" % ( obj, fh ) ) fh.truncate( 0 ) fh.seek( 0 ) - f = gzip.GzipFile( None, "wb", gzip_compress_level, fh ) - #f = fh + #f = gzip.GzipFile( None, "wb", gzip_compress_level, fh ) + f = fh f.write( Serializer.dumps( obj ) ) - del f + #del f fh.flush() @staticmethod @@ -39,8 +39,8 @@ class Serializer: def loadfh( fh ): logging.debug( "Going to load from %s" % fh ) fh.seek( 0 ) - f = gzip.GzipFile( None, "rb", gzip_compress_level, fh ) - #f = fh + #f = gzip.GzipFile( None, "rb", gzip_compress_level, fh ) + f = fh magic = Serializer.loads( f.read() ) return( magic ) |