23 class ConcatenatedGzipHistoryBlob
25 /* private */ var $mVersion = 0, $mCompressed = false, $mItems = array();
27 function HistoryBlob() {
28 if ( !function_exists( 'gzdeflate' ) ) {
29 die( "Need zlib support to read or write this kind of history object (ConcatenatedGzipHistoryBlob)\n" );
33 function setMeta( $metaData ) {
35 $this->mItems
['meta'] = $metaData;
40 return $this->mItems
['meta'];
43 function addItem( $text ) {
45 $this->mItems
[md5($text)] = $text;
48 function getItem( $hash ) {
50 return $this->mItems
[$hash];
54 if ( !$this->mCompressed
) {
55 $this->mItems
= gzdeflate( serialize( $this->mItems
) );
56 $this->mCompressed
= true;
60 function uncompress() {
61 if ( $this->mCompressed
) {
62 $this->mItems
= unserialize( gzinflate( $this->mItems
) );