Author: elwp
Description:
This class (SplitMergeGzipHistoryBlob) compresses large pages much better than
the old class ConcatenatedGzipHistoryBlob, and is reasonably fast. The attached
program historyblobtest.php includes some speed tests. To use it, export a
page with its complete history and call 'php historyblobtest.php pagename.xml'.
Unlike ConcatenatedGzipHistoryBlob SplitMergeGzipHistoryBlob does not use
serialization. So to create and save an object, use
$obj = new SplitMergeGzipHistoryBlob( $compressedBlob )
and
$compressedBlob = $obj->getCompressedBlob();
Three states are defined for SplitMergeGzipHistoryBlobs: SM_COMPRESSED,
SM_READONLY (uncompressed, but sections and indices not yet extracted)
and SM_READWRITE (completely converted into arrays). This is because
it would be too much overhead to extract all sections if only one revision
is requested. The layout of the flat uncompressed data as used in state
SM_READONLY is described in
http://meta.wikimedia.org/wiki/User:El/History_compression/Blob_layout
Version: 1.5.x
Severity: enhancement
OS: Linux
Platform: PC