* Improves compression ratio by concatenating like objects before gzipping
*/
class ConcatenatedGzipHistoryBlob implements HistoryBlob {
* Improves compression ratio by concatenating like objects before gzipping
*/
class ConcatenatedGzipHistoryBlob implements HistoryBlob {
- public $mVersion = 0, $mCompressed = false, $mItems = array(), $mDefaultHash = '';
+ public $mVersion = 0, $mCompressed = false, $mItems = [], $mDefaultHash = '';
- return array( 'mVersion', 'mCompressed', 'mItems', 'mDefaultHash' );
+ return [ 'mVersion', 'mCompressed', 'mItems', 'mDefaultHash' ];
* blob. By keeping the last-used one open, we avoid redundant
* unserialization and decompression overhead.
*/
* blob. By keeping the last-used one open, we avoid redundant
* unserialization and decompression overhead.
*/
- array( 'old_flags', 'old_text' ),
- array( 'old_id' => $this->mOldId )
+ [ 'old_flags', 'old_text' ],
+ [ 'old_id' => $this->mOldId ]
function diff( $t1, $t2 ) {
# Need to do a null concatenation with warnings off, due to bugs in the current version of xdiff
# "String is not zero-terminated"
function diff( $t1, $t2 ) {
# Need to do a null concatenation with warnings off, due to bugs in the current version of xdiff
# "String is not zero-terminated"
*/
function patch( $base, $diff ) {
if ( function_exists( 'xdiff_string_bpatch' ) ) {
*/
function patch( $base, $diff ) {
if ( function_exists( 'xdiff_string_bpatch' ) ) {
}
if ( isset( $this->mDefaultKey ) ) {
$info['default'] = $this->mDefaultKey;
}
$this->mCompressed = gzdeflate( serialize( $info ) );
}
if ( isset( $this->mDefaultKey ) ) {
$info['default'] = $this->mDefaultKey;
}
$this->mCompressed = gzdeflate( serialize( $info ) );