|
MediaWiki master
|
Diff-based history compression Requires xdiff and zlib. More...
Inherits HistoryBlob.

Public Member Functions | |
| __construct () | |
| __sleep () | |
| __wakeup () | |
| addItem ( $text) | |
| getItem ( $key) | |
| getText () | |
| isHappy () | |
| Helper function for compression jobs Returns true until the object is "full" and ready to be committed. | |
| setText ( $text) | |
| xdiffAdler32 ( $s) | |
| Compute a binary "Adler-32" checksum as defined by LibXDiff, i.e. | |
Public Attributes | |
| string null | $mCompressed |
| Compressed storage. | |
| string null | $mDefaultKey |
| The key for getText() | |
| array | $mDiffMap |
| The diff map, see above. | |
| array null | $mDiffs |
| Array of diffs. | |
| bool | $mFrozen = false |
| True if the object is locked against further writes. | |
| string[] | $mItems = [] |
| Uncompressed item cache. | |
| int | $mMaxCount = 100 |
| The maximum number of text items before the object becomes sad. | |
| int | $mMaxSize = 10_000_000 |
| The maximum uncompressed size before the object becomes sad Should be less than max_allowed_packet. | |
| int | $mSize = 0 |
| Total uncompressed size. | |
Diff-based history compression Requires xdiff and zlib.
WARNING: Objects of this class are serialized and permanently stored in the DB. Do not change the name or visibility of any property!
Definition at line 16 of file DiffHistoryBlob.php.
| DiffHistoryBlob::__construct | ( | ) |
Definition at line 60 of file DiffHistoryBlob.php.
| DiffHistoryBlob::__sleep | ( | ) |
Definition at line 275 of file DiffHistoryBlob.php.
References $mDefaultKey, and $mDiffs.
| DiffHistoryBlob::__wakeup | ( | ) |
Definition at line 302 of file DiffHistoryBlob.php.
| DiffHistoryBlob::addItem | ( | $text | ) |
| string | $text |
Implements HistoryBlob.
Definition at line 70 of file DiffHistoryBlob.php.
Referenced by setText().
| DiffHistoryBlob::getItem | ( | $key | ) |
| string | $key |
Implements HistoryBlob.
Definition at line 85 of file DiffHistoryBlob.php.
Referenced by getText().
| DiffHistoryBlob::getText | ( | ) |
Implements HistoryBlob.
Definition at line 99 of file DiffHistoryBlob.php.
References getItem().
| DiffHistoryBlob::isHappy | ( | ) |
Helper function for compression jobs Returns true until the object is "full" and ready to be committed.
Implements HistoryBlob.
Definition at line 337 of file DiffHistoryBlob.php.
| DiffHistoryBlob::setText | ( | $text | ) |
| string | $text |
Implements HistoryBlob.
Definition at line 92 of file DiffHistoryBlob.php.
References addItem().
| DiffHistoryBlob::xdiffAdler32 | ( | $s | ) |
Compute a binary "Adler-32" checksum as defined by LibXDiff, i.e.
with the bytes backwards and initialised with 0 instead of 1. See T36428.
| string | $s |
Definition at line 248 of file DiffHistoryBlob.php.
| string null DiffHistoryBlob::$mCompressed |
Compressed storage.
Definition at line 41 of file DiffHistoryBlob.php.
| string null DiffHistoryBlob::$mDefaultKey |
| array DiffHistoryBlob::$mDiffMap |
The diff map, see above.
Definition at line 34 of file DiffHistoryBlob.php.
| array null DiffHistoryBlob::$mDiffs |
Array of diffs.
If a diff D from A to B is notated D = B - A, and Z is an empty string:
{ item[map[i]] - item[map[i-1]] where i > 0
diff[i] = { { item[map[i]] - Z where i = 0
Definition at line 31 of file DiffHistoryBlob.php.
Referenced by __sleep().
| bool DiffHistoryBlob::$mFrozen = false |
True if the object is locked against further writes.
Definition at line 44 of file DiffHistoryBlob.php.
| string [] DiffHistoryBlob::$mItems = [] |
Uncompressed item cache.
Definition at line 18 of file DiffHistoryBlob.php.
| int DiffHistoryBlob::$mMaxCount = 100 |
The maximum number of text items before the object becomes sad.
Definition at line 53 of file DiffHistoryBlob.php.
| int DiffHistoryBlob::$mMaxSize = 10_000_000 |
The maximum uncompressed size before the object becomes sad Should be less than max_allowed_packet.
Definition at line 50 of file DiffHistoryBlob.php.
| int DiffHistoryBlob::$mSize = 0 |
Total uncompressed size.
Definition at line 21 of file DiffHistoryBlob.php.