20 class ConcatenatedGzipHistoryBlob
22 /* private */ var $mVersion = 0, $mCompressed = false, $mItems = array();
24 function HistoryBlob() {
25 if ( !function_exists( 'gzdeflate' ) ) {
26 die( "Need zlib support to read or write this kind of history object (ConcatenatedGzipHistoryBlob)\n" );
30 function setMeta( $metaData ) {
32 $this->mItems
['meta'] = $metaData;
37 return $this->mItems
['meta'];
40 function addItem( $text ) {
42 $this->mItems
[md5($text)] = $text;
45 function getItem( $hash ) {
47 return $this->mItems
[$hash];
51 if ( !$this->mCompressed
) {
52 $this->mItems
= gzdeflate( serialize( $this->mItems
) );
53 $this->mCompressed
= true;
57 function uncompress() {
58 if ( $this->mCompressed
) {
59 $this->mItems
= unserialize( gzinflate( $this->mItems
) );