13 class ConcatenatedGzipHistoryBlob
15 /* private */ var $mVersion = 0, $mCompressed = false, $mItems = array();
17 function HistoryBlob() {
18 if ( !function_exists( 'gzdeflate' ) ) {
19 die( "Need zlib support to read or write this kind of history object (ConcatenatedGzipHistoryBlob)\n" );
23 function setMeta( $metaData ) {
25 $this->mItems
['meta'] = $metaData;
30 return $this->mItems
['meta'];
33 function addItem( $text ) {
35 $this->mItems
[md5($text)] = $text;
38 function getItem( $hash ) {
40 return $this->mItems
[$hash];
44 if ( !$this->mCompressed
) {
45 $this->mItems
= gzdeflate( serialize( $this->mItems
) );
46 $this->mCompressed
= true;
50 function uncompress() {
51 if ( $this->mCompressed
) {
52 $this->mItems
= unserialize( gzinflate( $this->mItems
) );