Manuscript Offprint
arXiv:2610.26021On the Adaptive Covering Complexity of Strings: Unifying Relative and Self-Referential Compression
Abstract
We introduce and study the adaptive covering complexity , defined as the minimum number of contiguous factor blocks required to partition a string when each block is either a factor of a fixed external dictionary or a factor of the target's already decoded prefix. This hybrid admissibility model formalizes the structural interaction between static dictionary matching and dynamic non-overlapping self-referencing.
Our main theoretical result is the exact logarithmic law , which is tight and proves that dynamic self-reference can reduce phrase count by at most an exponential factor over static dictionary covering alone. We establish structural equivalences showing that the measure bridges word-segmented Relative Lempel–Ziv and non-overlapping LZ77, and we prove exact preset-history LZ77 sandwich bounds. Furthermore, we establish the optimality of the longest-match greedy parse via an exchange lemma and present an optimal implementation based on dual suffix automata running in time and space for a constant alphabet. These analytical results are complemented by counting bounds, stationary-ergodic asymptotic invariance, a dictionary-selection NP-hardness result, and a concise empirical illustration.
Index Terms
Adaptive covering complexity, Lempel-Ziv parsing, relative dictionary compression, suffix automata, string matching, entropy, minimum description length (MDL).
In this paper, building on the covering measure of [1], which we restrict to contiguous factors and extend with self-reference, we introduce and study the adaptive covering complexity, denoted . Given a fixed external dictionary , measures the minimum number of contiguous factor blocks required to partition a target string under a hybrid admissibility rule: each block must be either a factor of a word in or a factor of the target's already decoded prefix. This combinatorial measure provides a clean theoretical bridge, isolating the phrase-count consequences of combining global static dictionaries with non-overlapping local self-referencing.
It is crucial to distinguish this theoretical framework from practical compression implementations (such as zlib, Zstandard, or Brotli). While practical systems optimize a bit-level description cost using dynamic programming, sliding windows, and entropy coding, is a purely combinatorial phrase-count measure. Furthermore, while practical preset-dictionary LZ77 algorithms concatenate external history with target text into a single search buffer, keeps static external dictionary matching and dynamic internal self-referencing structurally distinct. This formal separation enables us to establish exact mathematical laws and structural bounds that cannot be derived directly from standard LZ77 parsing rules or bit-cost heuristics.
Our investigation addresses four foundational questions regarding this dual-source model:
-
How can adaptive covering be formally defined to unify static dictionary covering and dynamic self-referencing within a single non-overlapping admissibility framework?
-
What exact structural and quantitative laws govern adaptive covering, and how do they bound the gain of dynamic self-reference relative to static dictionary covering ?
-
How does this combinatorial complexity relate to classical Relative Lempel–Ziv, non-overlapping LZ77, and preset-history LZ77 parsing?
-
Can the optimal greedy adaptive parse be computed efficiently, and what is its computational complexity?
We emphasize that minimum phrase count is a combinatorial measure distinct from bit-level description cost. To complement our theoretical analysis, we provide a compact empirical section summarizing a dual-source bit-cost codec featuring Minimum Description Length (MDL) dictionary selection, while deferring full implementation details, ablations, and supplementary structural results to the appendices. None of this appendix material is used in the proofs of Sections III and IV, which contain all the main results: Appendices A and C, and Section V that summarizes the latter, can be removed, for instance in a shortened version, without affecting the main theorems.
Main Contributions.:
-
Formal Framework: We formulate the adaptive covering complexity , establishing a rigorous combinatorial bridge between external dictionary matching and internal self-referencing.
-
Exact Logarithmic Law: We prove the tight bounds (Theorem III.17), demonstrating that dynamic self-reference can reduce phrase count by at most an exponential factor. The lower bound generalizes to an arbitrary dictionary the classical doubling argument for non-self-referential LZ parsing, in which each phrase at most doubles the decoded text; for it reduces to the fact that such a parse of a string of length has at least phrases. We also derive a sharp repetition bound .
-
Parsing Equivalences and Sandwich Theorems: Under the non-overlapping factor convention, we prove that coincides with non-overlapping LZ77 phrase count , and that is tightly sandwiched with preset-history LZ77 up to an exact factor of 2 (Theorem IV.10).
-
Optimal Greedy Parsing and Linear-Time Algorithm: We establish the optimality of greedy parsing via an exchange lemma (Theorem IV.2) and present a dual suffix-automaton implementation running in time and space for constant alphabets (Theorem IV.12).
-
Supplementary Analysis and Empirical Illustration: We provide counting bounds, stationary-ergodic asymptotic invariance, and a dictionary-selection NP-hardness reduction in the appendices, alongside a compact empirical evaluation illustrating practical dual-source encoding. These results are not needed for the main theorems and may be omitted if required.
II. RELATED WORK
Adaptive covering sits at the intersection of relative dictionary compression, Lempel–Ziv parsing, combinatorics on words, and data structures for factor matching. The closest literature is not limited to practical preset-dictionary codecs: in particular, greedy phrase-count optimality and asymptotic LZ parsing already have substantial theoretical histories. We therefore distinguish established results from the specific combination of admissible sources studied here.
Relative compression and preset dictionaries.: Relative Lempel–Ziv (RLZ) parses a target against a fixed reference and has been studied for collections of related texts, including web collections and genomes [2], [3], in the spirit of the cross-parsing of Ziv and Merhav [4]. Practical formats also allow a preset dictionary to initialize the history available to an LZ encoder; zlib, Zstandard, and Brotli are prominent examples [5], [6], [7]. Dictionary construction is itself a design problem, and methods for constructing effective relative-LZ dictionaries and trained buffers address that engineering objective [8]. These systems establish that external and previously decoded material can both be useful in compression. They do not, by themselves, imply the structural bounds proved here: practical codecs optimize a bitstream under format-specific match, window, and coding constraints, whereas counts admissible contiguous factors.
A modeling distinction matters when comparing with RLZ. In this paper, S is a set of dictionary words and is the union of factors contained in individual words. A factor that crosses the boundary between two reference words is therefore not automatically admissible. This convention is narrower than treating a concatenation of references as one reference string, and the comparison with RLZ below is made under the stated word-segmented convention.
Greedy parsing: phrase count versus bit cost.: The foundational Lempel–Ziv schemes describe strings by references to earlier material [9], [10]; Storer and Szymanski analyze textual-substitution schemes and the role of overlap [11]. For phrase count, longest-match greedy parsing is known to be optimal in classical LZ77 settings, and work on suffix-closed dynamic dictionaries establishes conditions under which this property persists [12]. Cohn and Khazan studied parsing with prefix and suffix dictionaries [13], while Langiu surveys the broader distinction between minimizing phrase count and minimizing encoded bit length [14]. Kosolobov and Shur compare overlapping and non-overlapping LZ77 variants and show that their phrase counts can differ by a tight logarithmic factor [15]. We therefore do not claim a new general principle of greedy parsing. The self-contained exchange proof instead verifies optimality for the precise hybrid admissibility rule used here: a phrase must be a factor either of a fixed external dictionary word or of the already decoded prefix, with self-copies required to lie wholly in available material and not overlap the target phrase. This distinction matters because phrase-count optimality does not imply bit-cost optimality.
Asymptotic LZ theory.: The normalized phrase count of Lempel–Ziv parsing has long been studied for stationary ergodic sources. Ornstein and Weiss relate typical LZ phrase lengths to source entropy and provide a central asymptotic foundation for this line of work [16]. These results explain why the leading-order phrase-count behavior is governed by the source rather than by a fixed finite initial context. Our asymptotic result is related but has a specific scope: it compares the adaptive model with and without a fixed finite dictionary under the assumptions stated in Theorem A.12. It asserts equality of asymptotic normalized phrase counts, not equality of finite-length parses, encoded bit rates, or practical compression ratios.
Factor automata and algorithmic matching.: Suffix automata and factor automata represent the set of substrings of a word or a collection of words and support efficient factor matching. Blumer et al. give the classical linear-size automaton for the subwords of a text [17]; Mohri, Moreno, and Weinstein extend the construction and analysis to sets of strings [18]. These data structures are established tools, not a contribution claimed in isolation here. Our algorithmic contribution is to combine indexes for the external dictionary and the growing decoded prefix with the greedy decision rule, and to analyze the total cost of the resulting adaptive parse as under the implementation assumptions specified in Section IV. The linear bound depends on the matching procedure and amortization argument given there, rather than following merely from the existence of a suffix automaton.
Covering complexity, grammar compression, and dictionary selection.: Marteau introduced the covering measure from which the static quantity , restricted here to contiguous factors, is derived [1]; it serves as the static point of comparison. Grammar-based compression and smallest-grammar complexity provide a related but different perspective: they allow a reusable generative structure, rather than requiring each phrase to be a contiguous factor of an external word or the already decoded prefix [19], [20]. The NP-hardness result for choosing a dictionary is connected to the Shortest Common Superstring problem, whose complexity has been studied directly in the string-algorithms literature [21]. This reduction establishes hardness of the optimization problem under our dictionary model; it does not establish NP-completeness unless membership in NP is also proved for the chosen decision formulation.
Finally, the codec’s dictionary-selection objective follows the Minimum Description Length principle and its close relative, the minimum-description approach to statistical modeling [22], [23]. This is conceptually distinct from the combinatorial measure: MDL accounts for the cost of describing the dictionary as well as the encoded records, while counts phrases without assigning them bit costs. The experiments therefore test one concrete bit-cost realization of the model and should not be interpreted as proving that phrase-count optimality implies bit-optimal compression.
Positioning and scope.: The contribution is the analysis of one explicit hybrid admissibility rule, rather than the first use of preset dictionaries, the first greedy LZ parse, or the first suffix-automaton index. For this rule, we prove the logarithmic relation between static and adaptive covering, establish the stated relations with selected RLZ and LZ77 phrase-count measures, and give an optimal greedy algorithm with a linear-time implementation under the paper's assumptions. The counting and source-asymptotic results are complementary structural statements; they do not constitute bit-cost bounds. This separation is important because the codec's practical performance depends on dictionary/header overhead and on the actual coding costs of literals and pointers.
III. THEORETICAL FOUNDATIONS OF
A. Definitions and Modeling
Let be a non-empty finite alphabet and the set of finite strings over . Unless explicitly stated otherwise, no lower bound on is needed for the finite-string results. Let be a finite external dictionary. For a string , let denote the set of its non-empty contiguous factors, and for a set let
Thus literals are always admissible. Throughout the paper, reference means an occurrence entirely contained in material already available to the decoder; overlapping/self-extending copies are not part of the model.
Definition III.1 (Covering). A covering of a non-empty with respect to is a partition such that for every . We write for the minimum possible , with .
Definition III.2 (Adaptive covering). For and a position , define the available source set
An adaptive covering is a partition such that, if , then . The adaptive covering complexity is
Admissibility depends on the decoded prefix as a string, not on its phrase boundaries.
Definition III.3 (Greedy adaptive parse). At position i, let
with . The greedy adaptive parse takes and advances to . Its number of blocks is denoted .
Remark III.4 (Exact modeling choice). The original covering formulation associated with sub(S) uses the word “subsequence”. Here we explicitly restrict the model to contiguous factors, because the proposed algorithm and the LZ connection are factor-based. This is a deliberate restriction, not a silent reinterpretation of a cited definition.
Remark III.5 (Relation to relative and self-referential parsing). With only Fact(S) available, the model is a static dictionary covering. Adding Fact(s[1..i - 1]) makes the source set grow with the decoded target prefix. Fixed external references are available from the first position; self-references become available as decoding proceeds.
B. Properties of the non-adaptive scheme
Proposition III.6 (Bounds). For every non-empty and every , . Moreover . The same bounds hold for .
Proof. The lower bound is immediate. The upper bound follows from the covering by single symbols: since , the partition into blocks of length 1 is always valid. If , is a valid covering, so . Conversely, if the unique block lies in . The adaptive case is identical.
Proposition III.7 (Monotonicity in the dictionary). If , then for every , and . In particular, in phrase count the dictionary is at least as good as either or , for both measures.
Proof. implies for any , so every covering (adaptive or not) with respect to is also one with respect to .
Lemma III.8 (Monotonicity by contiguous factor). If is a contiguous factor of , then for every , .
Proof. Let be an optimal covering of . Restricting each block to the index range occupied by inside yields a partition of into at most blocks (those that intersect the range). Each restricted block is a contiguous factor of an element of , hence still belongs to .
Remark III.9. Lemma III.8 is specific to the non-adaptive scheme. For the restriction argument breaks down, since cutting away the beginning of removes part of the prefix that later blocks refer to. The property is in fact false: for , has whereas its factor abbaaaaab has .
Proposition III.10 (Exact bracketing of concatenation). For all non-empty and every ,
Proof. The upper bound follows by concatenating two optimal coverings. For the lower bound, let be an S-optimal covering of . The boundary separating and in (i.e., the exact position immediately following the last character of ) either falls between two blocks (so ) or cuts a block with (so and , i.e., ).
Corollary III.11 (Powers). For every non-empty , every and every , .
Proof. For both bounds are equalities. If they hold for , Proposition III.10 applied to and gives and .
Counterexample III.12 (Static covering does not support adaptive prefix reuse). Let and . Then and , while . Thus allowing the first string as an external word for the second changes the admissible source set; it cannot be modeled by simply concatenating the two static covering costs.
C. Properties of the adaptive variant
Unlike the non-adaptive scheme , the variant satisfies properties that are essential for compression. To state the chain rule precisely, we define the cost of covering in the context of , i.e. the cost of the second half of when the first half is already available as prefix.
Definition III.13 (Contextual adaptive covering). For non-empty strings , let be the minimum number of blocks in a factorization such that, for every ,
Proposition III.14 (Adaptive chain rule). For all non-empty and every finite dictionary ,
Moreover,
and consequently
Proof. We first prove the upper bound. Let
be an optimal adaptive covering of , so that
and let
be an optimal covering of in the context of , so that
By definition of contextual admissibility, each is a factor of an element of S or of
Therefore the concatenation
is an adaptive covering of . Hence
which gives
For the lower bound, let
be an optimal adaptive covering, with
Consider the boundary between and .
If the boundary falls between two blocks, say after , then
The first part is an adaptive covering of , while the second part is a valid contextual covering of given . Consequently,
Otherwise, the boundary cuts a unique block, say
where u is a non-empty suffix of and v is a non-empty prefix of . Since is admissible at its position, every contiguous factor of is admissible from the same source. Hence
is an adaptive covering of with j blocks.
For the second part, consider
At the beginning of this contextual covering, the whole string is available. Since v is a factor of the admissible block , it is also admissible. After decoding v, the available context is exactly , and thereafter the original blocks remain admissible because their original source occurrences were already available before their corresponding target blocks were decoded. Thus
is a contextual covering of with blocks.
Therefore
which is equivalent to
It remains to compare contextual covering with a dictionary containing . Let
be an optimal adaptive covering with respect to . For every , its source is either a factor of an element of , a factor of , or a factor of the already decoded prefix . In all three cases the same source is available in the contextual model with initial context . Hence the same covering is valid contextually, and
Combining this inequality with the upper bound already proved yields
Remark III.15. The lower bound cannot be stated with in place of : this dictionary does not contain factors straddling the boundary between and . For instance, with , and one finds , , but (cover aabbaabbbb as a | abb | aabb | b).
Proposition III.16 (Repetition bound). For non-empty and ,
The second bound is tight: for every letter .
Proof. Two copies. After an optimal adaptive covering of the first occurrence of w, the covered prefix is exactly w; the second occurrence is a factor of it and forms one additional block.
Doubling. Suppose with has been covered. The next block is a factor of the prefix , hence admissible, and afterwards is covered. Starting from , which costs , reaching takes further blocks.
Tightness. For and , the upper bound is attained. Indeed, the first phrase has length one, and each subsequent non-overlapping phrase has length at most the length of the already decoded prefix. After phrases, at most symbols can therefore have been covered. Thus any parse of needs at least phrases, matching the construction above.
Periodic structure is thus covered with logarithmically many blocks, where a static dictionary needs linearly many (Counterexample III.12 and Corollary III.19).
D. Adaptive versus static covering: an exact logarithmic law
The following theorem quantifies how much the decoded prefix can save with respect to the dictionary alone.
Theorem III.17 (Logarithmic law). For every finite and every non-empty ,
The lower bound is tight: for and it is an equality for every . The upper bound is also attained whenever , in particular for .
Proof. Every static covering is also adaptive, since at each position. This proves the right inequality.
For the left inequality, let be an adaptive covering with . Put and . The prefix is empty at the first step, so and . For , either , so , or is a factor of , so by Lemma III.8. In either case, Proposition III.10 gives
Hence , i.e. , and is an integer.
Remark III.18 (Sharpness of the bounds). The lower bound is attained for every integer over any non-empty alphabet . Choose , let , and set . Then . In any adaptive parse, the first phrase covers at least one occurrence of (of length ), and each subsequent phrase covers at most as many occurrences of as are already present in the decoded prefix. Hence, a parse with phrases covers at most occurrences of (i.e., at most symbols). Conversely, repeatedly copying the maximum available prefix of -blocks yields an adaptive parse of with phrases. Therefore,
For the upper bound, equality holds whenever (where both equal 1). Equality can also hold at larger values when the decoded prefix offers no repetition gain over the static dictionary, e.g., for , , and , where .
Corollary III.19 (Consequences). Let and .
- Universal logarithmic floor. For every string s of length n,
This bound is the absolute worst-case lower floor over all strings of length ; it is tight and fully achieved for highly repetitive strings, e.g., for and , or and where . (Note that for a non-repetitive string with , can be as large as , satisfying the inequality trivially).
- Exponential separation. For , whereas . By Theorem III.17, self-reference can never save more than an exponential factor over static dictionary covering, and this extremum is attained.
Proof. (1) Since every word in Fact(S) has length at most L, any static covering requires at least blocks, i.e., . Theorem III.17 then yields . For and with , the greedy parse takes as the first block and subsequently doubles the available prefix, covering symbols after k blocks, which matches the lower floor exactly. (2) Follows directly from the tightness statement of Theorem III.17.
IV. GREEDY PARSING, LZ CORRESPONDENCE, AND COMPUTATION
The theoretical analysis relies on efficient computation of under the non-overlapping factor convention. The practical codec is a separate construction and may use a cost-aware parser that does not minimize phrase count.
A. Greedy choice theorem
The following exchange lemma is the formal reason that the minimum phrase count can be computed greedily. It is specific to the factor-based, non-overlapping model fixed above.
Lemma IV.1 (Greedy exchange lemma). Fix a finite dictionary S and a current position i in a string s. Let
be a longest admissible block at position i. If there exists an optimal adaptive covering of the suffix whose first block is
then there exists an adaptive covering of the same suffix with no more blocks whose first block is g.
Proof. Let be an optimal adaptive covering of , where . Since is admissible at position with , we replace by .
Let be the ending position of . Every block of the original covering that ends at or before position is completely contained in the target interval already covered by and can therefore be discarded.
There is at most one block that straddles position , say with . If such a block exists, we replace it by its suffix and discard its prefix . All original blocks starting strictly after position (i.e., with start index ) are retained unchanged.
Every retained piece q is a contiguous factor of its corresponding original block p. We verify that q remains admissible at its position in the modified covering:
• If was sourced from the static dictionary , any factor of is also a factor of the same dictionary word, so remains admissible.
• If was sourced from the decoded prefix, say (or for the truncated block), its original source occurrence ended strictly before its target starting position, i.e., . In the modified covering, target symbols up to are fully decoded by before any retained block starting at or after is processed. Thus, remains entirely contained in the available decoded prefix when is reached, preserving admissibility under the non-overlapping constraint.
The resulting parse consists of followed by at most retained blocks. It forms a valid adaptive covering of using at most blocks, establishing optimality.
Theorem IV.2 (Greedy optimality). For every finite dictionary S, every finite string s and every position i, the greedy adaptive parse started at i covers with the minimum number of blocks among all adaptive coverings of whose blocks are admissible with respect to at their starting positions j. In particular
and the same holds for the contextual measure (take and ).
Proof. We prove the statement for every position i, by induction on the length of the unprocessed suffix.
If the suffix consists of a single symbol, the greedy parse emits that symbol and is clearly optimal. For the induction step, let g be the longest admissible block at the current position. Let
be an optimal adaptive covering of the current suffix. If , the greedy choice is already optimal. Otherwise is shorter than , and Lemma IV.1 provides an optimal covering whose first block is .
After removing , the remaining suffix is preceded by exactly the same decoded target prefix as in this modified optimal covering. Let denote the minimum number of blocks for . The blocks following in the modified optimal covering form an adaptive covering of with the same decoded prefix, so , and the converse inequality is obtained by prepending to an optimal covering of . By the induction hypothesis at position , the greedy parse from uses blocks. The greedy parse from therefore uses blocks, i.e. an optimal number.
Remark IV.3 (Relation to known results). The optimality of longest-match parsing under a uniform phrase cost is established in several classical dictionary-compression settings, including LZ77 and suffix-closed dictionary models [11], [13], [12]; Langiu surveys the distinction between phrase-count and bit-cost objectives [14]. We do not claim greedy optimality as a new general principle. The theorem above gives a self-contained proof for the particular hybrid source family in this paper, in which the admissible set is the union of factors of a fixed external dictionary and factors of the already decoded prefix, with the latter constrained to non-overlapping earlier occurrences. The theorem minimizes phrase count only; greedy parsing need not minimize encoded bit length.
B. Exact LZ correspondence
Definition IV.4 (Non-overlapping LZ77-style factorization). At position of , a candidate phrase has a non-overlapping previous occurrence if there is an occurrence with . The factorization chooses the longest such phrase; if no phrase of length at least two has a previous occurrence, it emits the single symbol . Let be the resulting number of phrases.
Proposition IV.5 (Empty-dictionary identification). For ,
Proof. With , the admissible phrases are exactly the contiguous factors having an occurrence completely inside , together with the literal . This is precisely Definition IV.4; Theorem IV.2 gives the equality with the minimum covering count.
Scope of the correspondence.: The identification is stated for the non-overlapping LZ variant. Proposition IV.8 below quantifies, as a weaker form of a known result [15], the gap to LZ77 with self-overlapping copies; no claim is made about LZ-End or other variants.
C. Relation to RLZ and to LZ77 with a preset dictionary
RLZ.: Relative Lempel–Ziv parses the target greedily into longest factors of a fixed reference, with literals for unmatched symbols [2]. Since Fact(S) is closed under taking factors, the exchange argument of Lemma IV.1 applies verbatim to the non-adaptive measure, so the greedy RLZ parse is optimal. We write for its phrase count, where is a set of words and phrases are factors of a single word.
Proposition IV.6 (Domination). For every S and s,
Proof. Every static covering is an adaptive covering, so . By monotonicity in the dictionary (Proposition III.7), , and by Proposition IV.5.
Remark IV.7 (Limits of the comparison). (i) RLZ as usually defined uses one concatenated reference R, whose factors may straddle word boundaries. Domination then holds only against the word-segmented dictionary: for , and , the static covering needs 2 blocks whereas the single-reference RLZ parse needs 1. (ii) The domination does not extend to LZ77 with self-overlapping copies, see Proposition IV.8.
Proposition IV.8 (Overlapping copies). Let be the phrase count of the greedy LZ77 parse in which a copy may overlap itself. Then, with ,
and the logarithmic factor is necessary: for , while .
Proof. Consider a greedy LZ77 factorization of into phrases . We show that each phrase can be covered in the non-overlapping adaptive model using at most contiguous blocks.
If is a literal or a non-overlapping copy (i.e., its source occurrence ends strictly before begins), it forms a single admissible block in .
Otherwise, is an overlapping copy of length with source distance . Its text is the prefix of length of , where is the pattern of length immediately preceding . We cover sequentially using non-overlapping blocks of lengths (with the last block truncated to fit ). At step , the already decoded prefix contains at least copies of , so the next block of length is fully contained in the available prefix and is therefore admissible.
The total length covered after blocks is . Setting requires blocks.
Summing over all phrases, we obtain .
To see that the logarithmic factor is tight, consider for . Here, (one literal a followed by one overlapping copy of length ), whereas by Proposition III.16.
Remark IV.9. Up to the convention for literal phrases, is the phrase count of non-overlapping LZ77 (Proposition IV.5). Kosolobov and Shur prove that this count exceeds the overlapping one by a factor at most, and that this is tight [15]. Proposition IV.8 is therefore a consequence, in a weaker form, of a known result; we keep the elementary proof above for completeness, since it uses the block-doubling construction of Theorem III.17.
LZ77 with a preset history.: For a reference , let be the phrase count of non-overlapping LZ77 on when is preloaded as history, i.e. each block is a factor of . This is the mechanism of preset dictionaries in zlib, Zstandard and Brotli.
Theorem IV.10 (Sandwich with preset-history LZ77). Let , let , and let be non-empty. Then
Consequently,
Proof. We first prove the left inequality. In the preset-history model, a block beginning at position i may be any contiguous factor of
In the adaptive model with dictionary , an admissible block is a factor of or a factor of . Both are factors of . Hence every adaptive covering is also a valid preset-history covering, and therefore
For the right inequality, let
be an optimal preset-history covering, where
Consider an arbitrary block beginning at position i of s. Its source occurrence lies in one of three regions of the preset history:
In the first case, is a factor of R and is therefore admissible in the adaptive model.
In the second case, is a factor of and is again admissible.
It remains to consider a source occurrence crossing the boundary. Then the source occurrence has the form
uv,
where is a non-empty suffix of and is a prefix of . Since and the copy is non-overlapping, lies entirely in the already decoded part of . Thus
Consequently can be replaced by at most two adaptive blocks, namely u and v.
Applying this transformation independently to every preset-history block yields an adaptive covering using at most 2m blocks. Hence
For the second statement, apply Proposition III.14 with , , and . Since
by Proposition IV.5, we obtain
and
Therefore
and
Combining these inequalities with the factor-2 sandwich gives
Remark IV.11. Theorem IV.10 shows that, for a single reference, adaptive covering is equivalent up to a factor 2 to preset-history LZ77: it is a combinatorial abstraction of the preset-dictionary mechanism rather than a new parsing model. What it adds is the separate treatment of the two sources, whose interaction Theorem III.17 quantifies. We do not know whether the factor 2 is attained; in an exhaustive search over binary R and s with and the ratio never exceeded 5/3.
To summarize the theoretical benefits of our formulation, Table I contrasts the formal properties of adaptive covering complexity against classic preset-history LZ77.
TABLE I
THEORETICAL COMPARISON: CLASSIC PRESET-HISTORY LZ77 VS. ADAPTIVE COVERING COMPLEXITY
| Theoretical Dimension | Classic Preset-History LZ77 | Adaptive Covering Complexity () |
| Dictionary Model & Boundary Handling | Concatenates dictionary words into a single search buffer, inadvertently creating artificial admissible factors that cross word boundaries. | Formulates a pure word-segmented dictionary model , cleanly isolating dictionary factors from prefix factors without boundary artifacts (Def. III.3, Rem. IV.7). |
| Source Separation & Interaction | Merges static history and dynamic text into a single search space, making source attribution and tracking ambiguous. | Structurally decouples static dictionary factors from dynamic prefix factors , enabling exact bounds on their interaction (Def. III.3, Thm. III.17). |
| Tight Equivalence & Boundary Cost | Relies on heuristics for boundary-crossing matches. | Bound by exact sandwich inequalities: , proving at most a factor-of-2 penalty for strict source separation (Thm. IV.10). |
| Periodic & Repetitive Structures | Coverage of repeated patterns depends on window length and buffer alignment heuristics. | Satisfies a strict, universal logarithmic repetition bound: , tight for any dictionary (Prop. III.16). |
| Compositional Algebra & Contextuality | Lacks a formal algebraic operator for conditional phrase complexity. | Features a rigorous contextual chain rule: (Prop. III.14). |
| Self-Overlap Mechanism | Standard variants allow self-overlapping copies , compressing repeated runs in 2 phrases. | Enforces non-overlapping factor references, yielding an exact logarithmic floor for and a tight logarithmic gap relative to overlapping LZ77 (Prop. IV.5, Prop. IV.8). |
| Asymptotic Behavior & Entropy Rate | Confounders exist between static buffer size and infinite-length source entropy. | Proves asymptotic invariance for stationary ergodic sources: almost surely, establishing that static dictionary gains are strictly a finite-length phenomenon (Thm. A.12). |
| Dictionary Maintenance & Diagnostic Criteria | Difficult to identify redundant or high-utility words due to buffer blending. | Provides formal local adaptation gains along the parse, yielding explicit criteria for dictionary pruning () and candidate promotion () (Def. A.6, Prop. A.7). |
D. Algorithm and complexity
The implementation mirrors the definition: at each phrase boundary it computes the longest prefix of the unprocessed suffix that is a factor of an element of or of the already decoded prefix. Both sets of factors are indexed by suffix automata (SAM). For , the index is the SAM of with ; since , a read of never uses a transition labelled , so it accepts exactly the factors of the . The index is the online SAM of the decoded prefix, extended by appending the symbols of each emitted phrase.
Algorithm 1 Greedy computation of adaptive covering complexity
Require: of length , finite dictionary
Ensure: and, optionally, its greedy phrases
1: Build the suffix automaton of ; let be the empty suffix automaton
2: ,
3: while do
4: length of the longest prefix of readable in
5: length of the longest prefix of readable in
6:
7: output as the next phrase
8: append the symbols of to
9: ;
10: end while
11: return
At the time of a query, recognizes exactly . The requirement that the source occurrence end before the phrase starts is therefore automatic, and no special treatment of overlaps is needed.
Theorem IV.12 (Linear-time computation). Let
and let . For a constant alphabet, Algorithm 1 computes and the corresponding greedy parse in
time and
space.
For an ordered alphabet of size , if suffix-automaton transitions are stored in balanced search trees, the corresponding bounds are
time and
space.
Proof. We first establish correctness. Let be the suffix automaton of
where and . Since every query string belongs to , no accepting path can cross a transition labelled and subsequently continue with symbols from another dictionary word. Thus a query over is accepted by if and only if it is a contiguous factor of some element of .
Let be the online suffix automaton obtained by appending to it, in order, all symbols of the phrases already emitted by the greedy parse. At the beginning of a query at position i, the inserted text is exactly
Therefore recognizes exactly the non-empty factors of . Since source occurrences must be entirely contained in the decoded prefix, this is precisely the self-reference condition of the model.
Consequently, the maximum of the two match lengths computed by Algorithm 1, together with the mandatory length-1 literal, is exactly the longest admissible block at the current position. Theorem IV.2 therefore implies that the algorithm computes .
We now prove the complexity bound.
A suffix automaton of a string of length contains at most states and transitions. Hence constructing costs time and space for a constant alphabet. With balanced search-tree transitions, construction costs time while using space.
Consider now the greedy scan of s. Suppose that the current phrase has length . The two automata are queried with the same unprocessed suffix. A query that successfully reads r symbols and then fails costs time for a constant alphabet. Thus the two queries together cost
where and are the longest matches in and , respectively.
The selected greedy phrase has length
SO
Hence the two SAM queries cost time. Appending the symbols of the selected phrase to costs time as well.
If the greedy parse contains phrases of lengths
then
Therefore the total cost of all SAM queries and all online extensions of is
Adding the construction cost for gives
total time and total space for a constant alphabet.
For an ordered alphabet with balanced search-tree transitions, each transition lookup or extension costs . The same charging argument therefore gives
time, while the number of SAM states and stored transitions remains , giving space.
Remark IV.13. An offline alternative computes a longest-previous-non-overlapping-factor table over S$s# from a suffix array; it is not needed here, because the online suffix automaton makes each query a plain read.
V. COMPACT EXPERIMENTAL ILLUSTRATION
The theoretical results concern phrase counts, not encoded bit length. To illustrate how the dual-source principle behaves in a practical setting, we briefly summarize a separate bit-cost codec that combines an external dictionary with references into the already decoded record. The implementation uses a bit-cost-guided dynamic-programming parser, permits overlapping copies, and restricts the candidate matches; it therefore does not instantiate the phrase-count model exactly, and its measurements do not validate the theoretical theorems. The full protocol, corpus descriptions, ablations, amortization analysis, and detailed tables appear in Appendix C.
TABLE II
COMPACT SUMMARY OF THE DUAL-SOURCE CODEC EVALUATION. RATIOS ARE PERCENTAGES OF RAW INPUT SIZE; GAINS ARE THE MEAN OF PER-DRAW RELATIVE GAINS, SO THEY NEED NOT EQUAL RATIOS RECOMPUTED FROM THE DISPLAYED MEANS. FULL SIZES AND PROTOCOL ARE IN APPENDIX C.
| Corpus | Codec ratio | Brotli-11 (ratio; gain) | Best tuned dictionary baseline (gain) |
|---|---|---|---|
| Synthetic genomic | 3.8% | 11.4%; +66.2% | zlib-9: tie (within 0.3%) |
| Synthetic JSON | 15.4% | 92.7%; +83.4% | zlib-9: +21.4% |
| Linux logs | 16.8% | 76.5%; +78.0% | zlib-9: +11.8% |
| Real genomic | 44.2% | 67.4%; +34.5% | zstd-19 (trained): +7.1% |
The codec selects its dictionary using the Minimum Description Length (MDL) principle, balancing the cost of describing the dictionary and associated coding tables against the encoded data length. The selection procedure uses training records and checkpoint evaluation under the same raw-header accounting rule as the reported evaluation. The dictionary is selected offline; the full objective, pruning algorithm, and training protocol are detailed in Appendix C. This MDL procedure concerns bit-level coding cost and is distinct from the phrase-count objective studied in the theoretical results.
The evaluation considers four short-record corpora: synthetic genomic records with tandem repeats, synthetic JSON logs, structured Linux logs, and real genomic records. Records are encoded independently, with a shared dictionary or header charged once, and the dictionary-based baselines are tuned on held-out validation data. The reported figures are means over three independent draws; small differences should consequently be treated cautiously. Table II summarizes the principal comparisons at the test-set size.
The codec substantially outperforms independent Brotli-11 compression on all four corpora. Against tuned dictionary compressors, the picture is more qualified: it is essentially tied with the best zlib-9 variant on the synthetic genomic corpus and smaller than the best tuned dictionary baseline on the other three, with a modest margin on real genomic data. The detailed appendix separately compares the codec with zstd-19, which is substantially larger than the codec in these tests, but zlib-9 remains the strongest overall dictionary baseline on the first three corpora. An ablation in Appendix C indicates that the external dictionary accounts for most of the gains on JSON, Linux logs, and real genomic records; dynamic self-reference is decisive on the tandem-repeat corpus but has little effect on the other three. Conversely, an idealized order-2 context model is smaller than the codec on the real genomic corpus. These context-model controls are estimates of ideal code length rather than fully implemented, independently decodable compressors, so they are informative diagnostics, not like-for-like deployment baselines.
Taken together, these experiments show that combining external and internal references can be useful for short-record compression, but do not establish state-of-the-art performance or a bit-cost consequence of the logarithmic law. The full appendix reports the remaining comparisons, accounting choices, dictionary amortization, limitations, and statistical caveats.
VI. Conclusion
This paper established the theoretical foundations of adaptive covering complexity, a combinatorial measure that formalizes the interaction between static external dictionary matching and dynamic internal self-referencing. By introducing a hybrid admissibility rule under the non-overlapping factor convention, we characterized the exact quantitative behavior of sequence parsing when both global background knowledge and growing prefix history are simultaneously available.
Our central finding is the exact logarithmic law, , proving that self-reference can yield at most an exponential reduction in phrase count relative to static dictionary covering alone. This bound, together with the sharp repetition inequality , demonstrates that periodic structures are parsed logarithmically in adaptive frameworks, avoiding the linear growth inherent to static schemes. Furthermore, we established natural equivalences with non-overlapping LZ77 and preset-history LZ77 via precise sandwich bounds, showing that adaptive covering serves as a clean combinatorial abstraction of classical preset-dictionary mechanisms.
From an algorithmic perspective, we proved the optimality of the greedy parsing strategy via a rigorous exchange lemma and introduced a linear-time implementation running in time and space using dual suffix automata. The supplementary structural results—including counting bounds, stationary-ergodic asymptotic invariance, and the NP-hardness of optimal dictionary selection—further delineate the mathematical landscape of the model.
While combinatorial phrase-count minimization abstracts away bit-level coding overhead, our empirical evaluation illustrates the dual-source principle on short-record corpora without establishing general superiority: the external dictionary accounts for most of the gains, self-reference is decisive only on the tandem-repeat corpus, and trained context models remain smaller on real genomic data. Several avenues remain open for future work: closing the gap on the constant factor in preset-history bounds, extending the sandwich theorems to multi-word dictionaries, and investigating the precise bit-cost analogues of the logarithmic law under optimized pointer representations.
ACKNOWLEDGMENT
During the preparation of this work, the author used generative-AI tools (Google Gemini, OpenAI ChatGPT, and Anthropic Claude) to assist with manuscript formatting, refinement of mathematical descriptions, and code implementation. The author reviewed and edited the resulting material and takes full responsibility for the contents of the paper. The complete source code, datasets, and experimental scripts associated with this paper are available at https://github.com/pfmarteau/Adaptive-Covering-Complexity-Codec
APPENDIX
The following results complement the main theory but are not required for the logarithmic law, greedy optimality, or the principal LZ correspondences. They are retained for completeness and to make explicit the scope of the claims. Nothing in Sections III and IV depends on this appendix, which can therefore be removed if needed; doing so only requires deleting the sentences that mention these results in the abstract, the introduction, the related work, the conclusion and the summary table of core properties.
A. Counting Bound and the Cost of Pointers
The measure counts blocks uniformly, whereas a pointer into the decoded prefix and a pointer into the dictionary may have different bit costs under a concrete encoding. The following counting bound controls how many strings can be represented with at most k blocks. It is a combinatorial counting statement, not a direct theorem about the number of bits required by a particular pointer code.
Theorem A.1 (Counting bound). Let , and . Then
Proof. Splitting an admissible block into consecutive sub-pieces yields valid adaptive blocks: if the original block is sourced from , any sub-piece remains a factor of ; if it is sourced from the decoded prefix, its source occurrence ends strictly before the original block starts, and thus remains fully decoded and non-overlapping for any subsequent sub-piece. Hence every with has an adaptive covering with exactly blocks. To overcount such strings, first choose the block lengths, a composition of into positive parts ( choices). Then describe each block in order by its source: a literal (possible only for a length-one block, with choices); a dictionary occurrence (at most starting positions across all dictionary words, once the block length is fixed); or an occurrence in the already decoded prefix (at most starting positions). Some choices counted this way may be invalid for the selected length or position, but every valid adaptive covering has at least one description of this form. Thus the number of strings is at most . For the second inequality, .
Corollary A.2 (Incompressibility). Assume . If , then all but a fraction at most of the strings of satisfy . In particular, for a fixed alphabet with and , almost every string needs blocks.
Remark A.3 (Cost asymmetry). Under a simple fixed-width pointer model, a pointer into the decoded prefix may require about bits, while a dictionary pointer may require about bits (with additional costs depending on the actual representation). Thus, when , dictionary pointers can be cheaper. The counting theorem above does not establish an exact bit-cost formula; rather, it motivates accounting for source-dependent pointer costs. Since counts all blocks equally, minimizing the number of blocks need not minimize code length, which motivates the bit-cost-guided Viterbi parser of Section D.
B. Match Profiles, Jump Sequences, and Adaptation Gain
The structure of dictionary and adaptive coverings can be characterized through local match profiles, which extend the classical longest-previous-factor function of LZ77 analysis to the dual-source setting.
Definition A.4 (Static, dynamic and adaptive match profiles). Let and let be finite. For each position , define
Since , for every , and is the length of the greedy block at .
Lemma A.5 (Greedy jump sequence). Define and , and let . Then . Likewise, the jump sequence with in place of has length exactly .
Proof. The sequence is the execution of the greedy adaptive parse (Definition III.3), which is optimal by Theorem IV.2. Removing restricts the sources to , which gives the static greedy parse; it is optimal by the same exchange argument.
Definition A.6 (Local adaptation gain). For the greedy adaptive parse , the gain at block is .
Proposition A.7 (Separation criterion). (i) If for every , then . Consequently, requires for some . (ii) The converse does not hold: a positive gain at some block does not imply .
Proof. (i) If then at every visited position, so by induction the adaptive and static jump sequences coincide, and Lemma A.5 gives equality. (ii) Let and . At position 3, , so , and the adaptive parse is . The static parse is , which also has 4 blocks.
Corollary A.8 (Two limiting regimes). (i) If for all , then . (ii) If for all , i.e. the dictionary offers nothing beyond literals along the parse, then .
Proof. Part (i) follows from Proposition A.7(i). For part (ii), at every visited position the adaptive jump equals , which is the jump of the greedy parse for . The two jump sequences therefore coincide by induction; Proposition IV.5 gives .
Remark A.9. The profiles and are available during the execution of Algorithm 1, so the gains provide a cheap diagnostic of the phrases where the decoded prefix compensates for missing dictionary entries.
C. Asymptotics for Stationary Ergodic Sources
Throughout this subsection, assume that is a fixed finite alphabet with . Let be a stationary ergodic source over , and let be its entropy rate measured in base , so that ; we assume . For let be the length of the longest prefix of that occurs in (0 if there is none). We use one classical fact, which holds almost surely: (F) (Wyner–Ziv; Ornstein–Weiss) [24], [16]. For the non-overlapping parse, the phrase count follows from (F) by a direct summation, which we include to avoid appealing to a rate result stated for a different LZ variant.
Lemma A.10 (Phrase count from match lengths). Let and be such that , where is computed on . Then .
Proof. By Proposition IV.5 and Definition IV.4, the phrase of the greedy non-overlapping parse of that starts at has length . Fix . Since , there is such that for all .
Lower bound. The phrases starting before end before some finite position independent of , and every later phrase has length at most . Hence .
Upper bound. Let . At most phrases start before . For , the phrases starting in that are not the last one have length at least , so there are at most of them for , and at most for . Since and , summing gives . Letting proves the claim.
Almost surely, (F) says that the realization satisfies the hypothesis of Lemma A.10 with , which is positive since . The conclusion of the lemma, , then reads , that is, almost surely, (F1) . (The case requires and is not treated here.)
Lemma A.11 (Eventual agreement of greedy parses). Fix a finite dictionary S and a finite initial decoded context u. Consider a suffix parsed from left to right, with every reference required to end before the current phrase starts. Suppose that, at every phrase-start position in this suffix, the longest match in the already decoded text (including u) is at least as long as the longest dictionary match. Then the greedy parse with dictionary S and the greedy parse with the empty dictionary make the same choice at every phrase boundary and hence have the same number of phrases.
Proof. At any such position, let be the longest match in the decoded text and let be the longest dictionary match (with if no dictionary factor matches). The hypothesis gives in the parse with dictionary (and without dictionary), so the maximum admissible match has length in both parses; only the length of the phrase matters for the count, not its source. The first phrase is therefore identical. After emitting it, both parses have the same extended decoded context, so the same argument applies inductively to every subsequent phrase boundary.
Theorem A.12 (Dictionary-independence of the normalized phrase count). For every finite , if , then almost surely,
Proof. By monotonicity, , so the lim sup is at most by (F1). Let . By (F), for the infinite sequence, so almost surely there is a finite with for all . Fix and write with . At every position of , the longest previous factor within is , whereas every dictionary match has length at most ; hence , the truncation at the end of the string affecting both sides. By Lemma A.11, the greedy parses of in the context of agree for dictionary and for the empty dictionary; since both are optimal by Theorem IV.2 (contextual form), . The chain rule (Proposition III.14) then gives
Dividing by and using (F1) proves the claim.
☐
Definition A.13 (Dictionary acceleration factor). For a string , , the ratio of the phrase counts without and with the dictionary.
Corollary A.14. If , then almost surely.
Proof. The proof above shows , and since and .
Remark A.15. The dictionary therefore does not change the asymptotic normalized phrase count under the assumptions of Theorem A.12; its effect is a finite-length phenomenon, which this paper quantifies only in special cases (Theorem III.17 and Corollary III.19) and empirically (Section K).
Definition A.16 (Optimal Adaptive Dictionary Problem (Opt-Adapt-Dict)). Given a finite training corpus , a dictionary size budget , and a phrase threshold , does there exist a dictionary with total length such that:
Theorem A.17 (NP-hardness of Opt-Adapt-Dict). The decision problem Opt-Adapt-Dict is NP-hard, even when the phrase threshold is fixed to K = N and all corpus strings are nonempty. The reduction preserves the alphabet, so hardness holds over a binary alphabet.
Proof. We give a polynomial-time many-one reduction from the decision version of Shortest Common Superstring. This problem is NP-hard [25], [26], including over a binary alphabet [26]. An instance consists of nonempty strings and an integer ; it asks whether there is a string of length at most containing every as a contiguous substring.
Construct the Opt-Adapt-Dict instance with corpus , the same budget , and threshold . This construction is polynomial in the size of the Shortest Common Superstring instance. Since every is nonempty, at least one phrase is needed to cover it, so . Further, by the definition of adaptive covering, if and only if is a substring of some dictionary word in : with a single phrase, no nonempty decoded prefix is available for self-reference.
Suppose first that the constructed dictionary-selection instance is a yes-instance. Then there exists a dictionary satisfying and . As each of the terms is at least one, every term must equal one. Thus every is a substring of some word in . Concatenating the words of produces a common superstring of length , so the Shortest Common Superstring instance is a yes-instance.
Conversely, suppose the Shortest Common Superstring instance has a common superstring with . Choose the dictionary . Each is then a substring of a dictionary word, so
for every . Therefore and . The constructed instance is a yes-instance as well.
The reduction preserves yes- and no-instances, proving that Opt-Adapt-Dict is NP-hard. This argument establishes NP-hardness; it does not by itself establish membership in NP.
Remark A.18. With K = N the problem asks that every training string be a single phrase, i.e. a factor of some dictionary word; it is therefore the Shortest Common Superstring problem in disguise, and the theorem says nothing about the quality of the heuristic of Section G.
The material in this appendix is an empirical instantiation, not a consequence of phrase-count optimality. The implementation permits overlapping self-copies and uses a bit-cost-guided parser, whereas the theoretical measure uses non-overlapping factors and uniform phrase costs. Accordingly, the experimental findings should be interpreted independently of the main combinatorial theorems. This appendix, like Section V, is not needed for any theorem of the paper and can be removed if required.
D. From the Formal Measure to a Practical Code
Positioning note. This section bridges the combinatorial measure introduced in Section III with a practical, bit-level compression algorithm. While minimizes the pure block count under an unweighted factor-selection model, a concrete compressor minimizes total encoded bit-length. Consequently, dictionary selection, candidate match filtering, and bit-optimal parsing represent downstream engineering adaptations. The codec described herein serves as an empirical instantiation illustrating the model's structural principle—combining static external dictionary coverage with dynamic self-referencing—rather than as a proof of phrase-minimization equivalences; Section K reports where that principle helps and where it does not.
E. Bridge Between Phrase Count and Code Length
The theoretical complexity assigns a uniform cost of 1 to every admissible factor block (whether drawn from Fact(S) or from the decoded prefix). In contrast, a physical codec must encode the metadata required to uniquely identify each block:
-
Block type selection: Emitting a literal , a dictionary reference , or a self-reference incurs an entropy cost .
-
Dictionary references (D): Require encoding a word identifier (via Move-To-Front ranking), an internal word offset, and a match length.
-
Self-references (S): Require encoding a backward distance d and a match length .
-
Literals (L): Require encoding the byte/character symbol from an alphabet model or an escape code.
Because these payload items carry non-uniform bit costs depending on their context and magnitude, a greedy longest-match parse (which minimizes total block count by Theorem IV.2) does not, in general, yield a minimum-length bitstream. The codec therefore substitutes the greedy rule with a bit-cost-guided dynamic programming parser while retaining the underlying dual-source architecture.
F. Correspondence with Practical Compressors
The dual-source design of unifies two widespread paradigms in practical compression:
-
corresponds to Relative Lempel–Ziv (RLZ) [2], [3] with a word-segmented dictionary: fixed external dictionary , optimized for fast random access and inter-record redundancy across homogeneous databases. RLZ proper uses one concatenated reference, see Remark IV.7.
-
corresponds to LZ77 with a preset dictionary [9], [5]: classical LZ77 augmented with a static reference , the mechanism behind dictionary-mode Zstandard [6] and Brotli [7]. For a single reference the correspondence holds up to a factor 2 (Theorem IV.10).
While algorithms like COVER [8] train dictionaries for LZ77 codecs via heuristic substring coverage, our framework integrates dictionary selection directly with the dual-source bit-length objective via Minimum Description Length (MDL) optimization.
G. Dictionary Selection via MDL
Objective formulation.: To select a compact, high-utility dictionary S from a training corpus , we apply the Minimum Description Length (MDL) principle [23], [22]. The cost function balances dictionary serialization overhead against compressed data length over :
where denotes the UTF-8 byte length of word , and 3 bytes per record account for record-header metadata. The parameter scales the sample data cost to the expected deployment scale.
The ideal data bit-length is computed under a fast static zero-order entropy proxy, with symbol counts pooled over the whole training corpus, across seven symbol families (block types, literals, Move-To-Front dictionary ranks, dictionary offsets, dictionary lengths, self-reference distances, and self-reference lengths):
The counts are those of a greedy parse of each record: at each position, the longest dictionary factor is taken if it is at least as long as the longest repetition of the already decoded prefix; otherwise that repetition is taken if it has length at least 2; otherwise a literal is emitted. This parse is cheaper than, and differs from, the bit-optimal Viterbi parse of the codec (Section D), which is why the final choice among candidate dictionaries relies on the true codec cost (step 3 below).
Candidate generation and pruning.: Candidates are initialized as maximal repeated substrings of length 3 to 64 occurring in at least two distinct training documents, followed by subsumption pruning (discarding any candidate that is a proper substring of a longer retained candidate). Dictionary refinement then proceeds via incremental backward pruning (Algorithm 2), the exact variant (m = -1) used as reference in Section K:
-
Greedy Seeding: Form containing the candidates that are credited, as the first candidate containing a matched factor, during the greedy parse of with all candidates active.
-
Incremental Removal: Visit the candidate words in increasing order of utility , where is the number of times is credited in the current parse of (not its document frequency), and drop whenever this does not increase (ties are accepted). Sweeps are repeated until a final sweep, evaluated exactly without the incremental shortcuts, removes nothing. A fast three-level evaluation avoids full corpus re-parsing unless a factor of the removed word disappears from the parse.
-
Checkpoint Selection: Extract K = 25 evenly spaced candidate dictionaries along the pruning path P and select
Here J is the true cost of the complete codec on , and header is the raw (uncompressed) header size charged at evaluation time (Section L); ties are broken in favor of the smaller dictionary.
Lazy variant (m = 1).: To reduce the number of evaluations, a lazy greedy variant first removes in one step the words that are never credited (the parse does not change), then computes once the exact change of every word, keeps these values in a min-heap, and refreshes only the head of the heap, as in lazy-greedy (CELF) submodular maximization. A word is removed when its refreshed value does not exceed 0 and is still the smallest in the heap; it is put back in the heap if another value is now smaller, and discarded for good if its refreshed value is positive. The procedure stops when the smallest value is positive. This relies on the heuristic assumption that removing other words can only increase , which is not guaranteed for this objective; the variant can therefore stop at a worse dictionary than the exact sweeps. Both variants produce a pruning path along which step 3 selects the final dictionary.
Algorithm 2 MDL Dictionary Selection via Incremental Backward Pruning
Require: Candidate set , training corpus , penalty scale , checkpoints
Ensure: Retained dictionary and pruning path
1:
2: , ,
3: repeat
4: improved ← false
5: Sort active words in increasing order of
6: for each in sorted order do
7:
8: if then
9: ;
10: Append to ; improved ← true
11: end if
12: end for
13: until not improved
14: Extract evenly spaced checkpoints
15: Evaluate exact codec cost for each
16: return
▷ Ties broken towards smaller
Why a heuristic.: Selecting an optimal dictionary is NP-hard for the phrase-count objective under a size budget (Theorem A.17), so no polynomial-time exact algorithm is expected, which motivates a heuristic. The theorem does not, however, justify this particular heuristic: it gives no approximation guarantee for backward pruning or for its lazy variant, and it concerns the phrase count, whereas the objective L above is a bit-cost proxy whose hardness we do not prove. The quality of the selected dictionaries is therefore assessed empirically (Section N).
H. Codec Architecture and Bit-Optimal Parsing
Block structure.: The output token stream partitions the input string into three block types:
• Literal (L): Emits a single character coded via an alphabet range model (or escaped to a side stream).
• Dictionary Reference (D): Emits a triplet (word_rank, offset, length) referencing a factor contained entirely within a single dictionary entry .
• Self-Reference (S): Emits a pair (distance, length) copying from . To prevent representation overhead, blocks enforce length . Overlapping copies (distance < length) are permitted as in standard LZ77.
Bit-optimal Viterbi parser.: Let . The optimal parse is computed via dynamic programming over an state grid, where state records the block type ending at position :
where represents the exact bit cost of encoding block 's parameters under the active probability tables.
At position i, candidate blocks are restricted to:
-
The single literal symbol .
-
Dictionary factors found by matching against a Directed Acyclic Word Graph (DAWG) or Suffix Automaton (SAM) constructed over S.
-
Self-reference matches found via a sliding 3-gram index over , restricted to the 12 most recent occurrences and capped at length 256.
Context initialization and Viterbi training.: Probability models are initialized during context construction. An iterative Viterbi training loop performs refinement passes over :
-
Pass 0: Parse using uniform heuristic block costs to gather initial transition and parameter distributions.
-
Passes 1–3: Re-parse using the dynamic programming parser driven by logarithmic probabilities estimated from the preceding pass, applying Laplace add-one smoothing.
This iterative alignment adjusts transition probabilities to reflect true coding overhead, preventing literal over-penalization.
I. Entropy Coder, Escapes, and Stream Format
Range coding and side stream.: All structured block fields are encoded into a unified bitstream using a 32-bit integer range coder with static cumulative frequency tables. Integer parameter values present in the model support are coded directly by the range coder. Out-of-support or large integers ( ) trigger an arithmetic ESCAPE symbol, and their value v is written to a secondary side stream using Elias-gamma variable-length coding.
Robustness and unseen symbols.: If a character in a test file is absent from the context alphabet learned during training, the literal model emits ESCAPE_CHAR, followed by the character's full Unicode code point in the side stream. This guarantees complete round-trip reliability under out-of-distribution character drift without requiring dictionary retraining.
Header and payload encapsulation.: The shared context (dictionary S, alphabet, and cumulative probability tables) is serialized into a single zlib-compressed header prefix. Each encoded file body consists of three variable-length header fields (uncompressed string length, arithmetic stream byte count, side stream byte count) followed by the concatenated arithmetic and side streams.
J. Computational Complexity
The computational bounds of the implementation are structured as follows:
• Offline Dictionary Selection (MDL): Candidate generation and seed parsing require time, where is the mean training record length. Backward pruning with three-level incremental evaluation re-parses affected documents in amortized time. Checkpoint selection requires full Viterbi parses of .
• Context Training (R = 3 passes): Building the static dictionary SAM takes time and space. Each Viterbi refinement pass over takes time due to bounded lookup candidates.
• Per-File Encoding and Decoding: For a target string s of length N:
– Candidate generation is bounded by operations per position thanks to the SAM dictionary traversal and capped 3-gram lookback (12 candidates, max length 256).
– The Viterbi DP parser executes in time and space.
– Single-pass range encoding/decoding operates in time, where is the count of dictionary blocks (accounting for MTF rank updates).
K. Experimental Evaluation: a Dual-Source Codec on Short Records
This section evaluates the practical dual-source codec of Section D, not the combinatorial measure itself. The codec uses a bit-cost-guided parser, may emit overlapping copies, and bounds its candidate set, so the phrase-count results of Sections III and IV do not apply to it verbatim. All compressors are evaluated in the same setting: each record is compressed independently and must be decodable on its own from a shared header or dictionary, which preserves random access. Solid-archive compressors that exploit redundancy across records are therefore out of scope. The experiments address four questions:
-
Size. How much smaller is the codec than general-purpose and dictionary-based compressors when the baselines are given tuned dictionaries and minimal framing?
-
Components. What do the dictionary, the self-reference, the MDL selection and the pruning mode each contribute?
-
Trained statistics. Is the gain explained by the dictionary-based parse, or would a simple context model trained on the same data do as well?
-
Amortization. How does the comparison depend on the number of records over which the dictionary or header cost is spread?
The comparison is deliberately conservative: baselines are tuned on held-out validation data, they are given dictionary budgets from 512 B to 32 KiB, including budgets matched to the size of the codec's dictionary and header, and we report the cases in which the codec does not win as well as those in which it does.
L. Corpora and Experimental Protocol
Corpora.: Two synthetic and two real corpora are used.
• Synthetic genomic. Each record is a fixed 52-character template followed by a tandem repeat of one motif drawn from a pool of 100 motifs of 3 to 6 bases, repeated between 4 and 100 times (mean length 288 B). Tandem repeats are present by construction.
• Synthetic JSON logs. Near-identical event lines varying in the minute and second of a timestamp, a server name (5 values), an HTTP-like status (7-entry skewed list), an event name (5 values) and a session identifier ( values) (mean length 114 B).
• Linux logs. Rows of the Loghub Linux_2k structured log, each converted into a JSON object whose keys are the column names (mean length 191 B).
• Real genomic. About one thousand genomic records truncated to 200 B (mean length 200 B). Because the synthetic generators are known, the Shannon entropy of the source can be computed exactly: 13.1 bits (1.64 B) per record for the genomic generator and 38.0 bits (4.76 B) per record for the JSON generator. These figures are floors for the per-record payload of any decodable code and do not include the cost of describing a dictionary.
Splits and draws.: For the synthetic corpora, training and test records are generated with independent seeds (s and ); the validation set (100 records) is the continuation of the training stream and is used only to select baseline hyper-parameters. We use and generate test records for each synthetic corpus, from which those identical to a training record are removed (this concerns only the synthetic genomic generator, whose records are drawn from a template, a pool of 100 motifs and a repetition count; 979 test records remain on average, none are removed for JSON). For the real corpora, records are partitioned at random, with quotas scaled down proportionally when the corpus is small (about 770 test records for real genomic data, 1,000 for the Linux logs). In all cases . Every figure is a mean over 3 independent draws.
Methods compared.:
• Codec. The dual-source codec with MDL dictionary selection (Algorithm 2), with exact backward pruning (m = -1) as the reference and lazy pruning (m = 1) as a variant, checkpoint selection by the true codec cost (K = 25 checkpoints), computed with the raw size of the header so that the selection criterion and the evaluation charge the same quantity, and three Viterbi re-estimation passes. The header (alphabet, dictionary S and probability tables) is included in every size.
• General-purpose compressors (no dictionary). zlib (level 6 with its container; level 9 as raw DEFLATE), zstd level 19, Brotli quality 11, LZMA (raw LZMA1) and bzip2. Container overhead is removed wherever the format allows it: zstd is run without magic number, checksum, content size or dictionary identifier.
• Dictionary-based compressors. zlib-9 (raw DEFLATE with a preset dictionary) and zstd-19 with a dictionary, each with three dictionary sources: training records sampled at random (“sampled”), the dictionary produced by zstd’s trainer (“trained”), and the content of the MDL dictionary S used as raw dictionary text.
• Idealized controls. Static order-k context models ( , Witten–Bell interpolation) trained on the same training records. Their cost is the ideal code length of each record plus one byte for arithmetic-coder termination, and the model is charged at the size of its raw serialization. They are not implemented as decoders; they measure what trained statistics alone can achieve. The codec’s literal model, by contrast, does not condition on the preceding symbols.
• Optimistic bounds. Brotli, LZMA and PPMd offer no custom-dictionary interface in the Python bindings we use. Their dictionary-primed cost is estimated from the marginal cost of a record appended to the dictionary. This estimator is biased in favor of the baseline (Appendix), so these rows are reported there only and are excluded from all comparisons.
Accounting and tuning.: The total size of a method is the sum of the compressed record sizes (payload), of one length field per record (the same variable-length integer for all methods, so that every record can be located), and of the shared dictionary or header. For each dictionary-based family the dictionary size is swept from 512 B to 32 KiB, with two additional matched budgets equal to the size of S and to the size of the codec header; the budget that minimizes the expected total size on the validation set is retained. The codec needs no budget, since the MDL criterion chooses the dictionary size. Every method is charged for its dictionary, header or model at its raw (uncompressed) size: for the codec, the whole uncompressed header (alphabet, dictionary S and probability tables, not only the words of S); for the baselines, the raw dictionary text; for the context controls, the raw serialized model. This is the rule least favorable to the codec, whose header is stored compressed (1.8 to 3.1 times smaller than its raw size); the appendix tables report both sizes, and Section M gives the effect of charging stored sizes. Baseline budgets were selected on the validation set under the raw rule. Every decodable method is decoded and compared byte for byte with its input, and the codec's decoder is rebuilt from the serialized header alone.
Reading the tables.: is the relative gain of the codec with respect to a method, averaged over draws of the per-draw gain. A positive means that the codec is smaller than the method by of the method's size; a negative means that the method is smaller than the codec.
M. Main Results
Against general-purpose compressors.: Without a dictionary, independent compression of short records is ineffective. Brotli-11 is the best general-purpose baseline on all four corpora, with ratios of
TABLE III
SCENARIO A: TOTAL COMPRESSED SIZE (B) OF THE HELD-OUT RECORDS AND GAIN OF THE CODEC AGAINST EACH BASELINE.
| Method | Synth. genomic | Synth. JSON | Linux logs | Real genomic | ||||
|---|---|---|---|---|---|---|---|---|
| Total (B) | Δ (%) | Total (B) | Δ (%) | Total (B) | Δ (%) | Total (B) | Δ (%) | |
| Ours | ||||||||
| Codec (MDL, exact pruning) | 10 847 | ref. | 17 566 | ref. | 32 115 | ref. | 68 063 | ref. |
| Codec, lazy pruning () | 11 304 | +4.0 | 18 544 | +5.3 | 32 255 | +0.4 | 74 656 | +8.8 |
| Dictionary-based baselines (decodable) | ||||||||
| zlib-9 + trained dict. | 10 877 | +0.3 | 22 521 | +22.0 | 37 170 | +13.6 | 73 874 | +7.9 |
| zlib-9 + sampled dict. | 11 901 | +8.8 | 22 336 | +21.4 | 40 485 | +20.5 | 74 835 | +9.0 |
| zlib-9 + MDL dict. | 10 844 | 0.0 | 22 882 | +23.2 | 36 393 | +11.8 | 74 333 | +8.4 |
| zstd-19 + trained dict. | 19 754 | +45.1 | 31 831 | +44.8 | 45 402 | +29.3 | 73 295 | +7.1 |
| zstd-19 + sampled dict. | 20 738 | +47.7 | 31 830 | +44.8 | 51 081 | +37.0 | 86 139 | +21.0 |
| zstd-19 + MDL dict. | 20 244 | +46.4 | 33 003 | +46.8 | 47 772 | +32.8 | 86 903 | +21.7 |
| General-purpose baselines (no dictionary) | ||||||||
| Brotli-11 | 32 128 | +66.2 | 105 746 | +83.4 | 145 976 | +78.0 | 103 859 | +34.5 |
| zstd-19 | 36 451 | +70.2 | 111 007 | +84.2 | 154 182 | +79.2 | 110 594 | +38.5 |
| zlib-9 (raw deflate) | 41 792 | +74.0 | 108 863 | +83.9 | 148 653 | +78.4 | 110 199 | +38.2 |
| zlib-6 (framed) | 47 666 | +77.2 | 114 863 | +84.7 | 154 785 | +79.2 | 114 832 | +40.7 |
| LZMA (raw) | 48 709 | +77.7 | 110 163 | +84.0 | 155 187 | +79.3 | 115 571 | +41.1 |
| bzip2 | 67 493 | +83.9 | 137 482 | +87.2 | 183 323 | +82.5 | 133 760 | +49.1 |
-codec/method, mean over the independent draws of the per-draw gain: positive means the codec is smaller, negative that the method is smaller. Bold: best decodable dictionary-based baseline. Totals include the dictionary or header and the record index. Every method is charged for its dictionary, header or model at its raw (uncompressed) size: for the codec, the whole uncompressed header (alphabet, dictionary and probability tables); for the baselines, the raw dictionary text; for the context controls, the raw serialized model. Idealized controls are reported in Table IV; optimistic bounds in the appendix.
11.4% (synthetic genomic), 92.7% (JSON), 76.47% (Linux) and 67.44% (real genomic); the others are worse, and on the JSON records all general-purpose outputs lie between 93% and 121% of the raw size. The codec reaches ratios of 3.8%, 15.4%, 16.8% and 44.2%, that is 34.5–83.4% smaller than Brotli-11 (, +83.4, +78.0 and +34.5%).
Against dictionary-based compressors.: Equipped with tuned dictionaries, zlib and zstd become much stronger, yet the codec remains smaller than every dictionary-based variant on three corpora and ties with the best one on the fourth. Against zstd-19, the best variant is the trained dictionary on synthetic genomic data (19,754 B, ), on the Linux logs (45,402 B, ) and on real genomic data (73,295 B, ), and the sampled dictionary on JSON (31,830 B, , the trained one being 1 B larger). Against zlib-9, the codec is smaller than the best variant on JSON (17,566 against 22,336 B with a sampled dictionary, ), on the Linux logs (32,115 against 36,393 B with S, ; 37,170 B with a trained dictionary, ) and on real genomic data (68,063 against 73,874 B with a trained dictionary, ; and +9.0% for the MDL and sampled dictionaries). On synthetic genomic data the codec (10,847 B) and the two best zlib-9 variants (10,844 B with S, 10,877 B trained) lie within 0.3% of each other, which with three draws we regard as a tie ( and +0.3%); the sampled variant is 8.8% larger than the codec.
At equal dictionary content.: Giving zlib-9 the MDL dictionary S isolates the parse and the entropy coder from the dictionary content. The codec is then smaller on JSON (17,566 against 22,882 B, ), on the Linux logs (32,115 against 36,393 B, +11.8%) and on real genomic data (68,063 against 74,333 B, +8.4%), where its payload is 28.8%, 16.9% and 14.1% smaller. On synthetic genomic data the payload gain is only 2.4% (8,964 against 9,183 B), which DEFLATE copies natively on tandem repeats, and it is cancelled by the larger header of the codec (904 against 683 B raw, because of its alphabet and probability tables): the totals are equal ( ). The comparison is therefore not exactly at equal cost, since the codec also pays for its tables. The MDL dictionary is a competitive dictionary text for DEFLATE: it is the best zlib-9 dictionary on synthetic genomic data and on the Linux logs, 2.4% worse than a sampled dictionary on JSON and 0.6% worse than a trained one on real genomic data.
Sensitivity to the charging rule.: Charging every method at its stored (zlib-compressed) size instead, computed from the totals of the appendix tables without re-tuning the baseline budgets, the codec totals become 10,231, 16,403, 28,425 and 63,716 B. The ranking against the dictionary-based baselines is unchanged: the codec remains smaller than the best zlib-9 variant on JSON ( ), Linux (+12.0%) and real genomic data (+8.8%), and on synthetic genomic data it is 0.2% smaller than zlib-9 with S (10,249 B), still a tie. The rule matters only for the idealized controls: the margin of the codec over the order-2 context model on synthetic JSON falls from 4.1% to 1.6%, and the codec remains larger on real genomic data (50,998 B for order 2, ). The raw rule used throughout is the conservative one for the codec, whose header compresses 1.8 to 3.1 times.
N. Ablations and Idealized Controls
The dictionary dominates on short records.: Removing the dictionary ( , the codec then behaves as an adaptive LZ77 coder) multiplies the total size by 2.14 (synthetic genomic, 23,263 B), 4.22 (JSON, 74,122 B), 3.49 (Linux, 112,225 B) and 1.21 (real genomic, 82,641 B). The external dictionary is thus the primary engine of compression, least so on the real genomic data.
TABLE IV
ABLATIONS OF THE CODEC AND IDEALIZED CONTROLS (SCENARIO A). SAME CONVENTIONS AS TABLE III; FOR THE CONTROLS THE MODEL SIZE IS CHARGED IN THE TOTAL COLUMN (RAW SIZE).
| Method | Synth. genomic | Synth. JSON | Linux logs | Real genomic | ||||
|---|---|---|---|---|---|---|---|---|
| Total (B) | (%) | Total (B) | (%) | Total (B) | (%) | Total (B) | (%) | |
| Codec variants | ||||||||
| Codec (MDL, exact pruning) | 10847 | ref. | 17566 | ref. | 32115 | ref. | 68063 | ref. |
| Codec, lazy pruning () | 11304 | +4.0 | 18544 | +5.3 | 32255 | +0.4 | 74656 | +8.8 |
| Codec w/o self-reference (RLZ) | 60355 | +82.0 | 17565 | 0.0 | 32305 | +0.6 | 66157 | -2.9 |
| Codec w/o dictionary () | 23263 | +53.4 | 74122 | +76.3 | 112225 | +71.4 | 82641 | +17.6 |
| Codec, = chunks of zstd-trained dict. | 11623 | +6.7 | 18456 | +4.8 | 38539 | +16.7 | 63198 | -7.7 |
| Idealized trained context models (not decoded; ideal code length +1B per record) | ||||||||
| Order-1 context model (ideal) | 71383 | +84.8 | 30389 | +42.2 | 67052 | +52.1 | 55129 | -23.5 |
| Order-2 context model (ideal) | 71627 | +84.8 | 18314 | +4.1 | 42269 | +24.0 | 54077 | -25.9 |
| Order-3 context model (ideal) | 70715 | +84.7 | 19538 | +10.1 | 42829 | +25.0 | 60604 | -12.3 |
Self-reference is decisive on tandem repeats and irrelevant elsewhere.: Removing dynamic self-reference (pure RLZ with the same parser) multiplies the size by 5.56 on synthetic genomic data (60,355 against 10,847 B), a corpus built from tandem repeats: there the dictionary alone is worse than no dictionary (23,263 B for ), and the combination of both sources is what makes the codec effective. This is consistent with the repetition bound of Proposition III.16, under which a motif repeated times is covered by one dictionary block plus about prefix blocks in the non-overlapping model; the codec, which allows overlapping copies, needs a single self-reference block whatever , so its gain is, if anything, larger than that model predicts. On the three other corpora the effect is small: 0.0% on JSON, +0.6% on the Linux logs, and -2.9% on real genomic data, where RLZ is smaller (66,157 against 68,063 B). Their records contain little internal repetition beyond what the dictionary covers. Self-reference thus pays only when records repeat their own content.
MDL selection and pruning mode.: Exact backward pruning () is better than or equal to lazy pruning () on all four corpora: 10,847 against 11,304 B on synthetic genomic data (), 17,566 against 18,544 B on JSON (+5.3%), 32,115 against 32,255 B on Linux (+0.4%, within the noise) and 68,063 against 74,656 B on real genomic data (+8.8%). Lazy pruning always yields the larger raw header (1,628 against 904 B, 2,838 against 2,019 B, 6,758 against 5,934 B and 15,816 against 9,495 B), and a smaller payload only on synthetic genomic data and on the Linux logs (8,697 against 8,964 B and 24,497 against 25,181 B): the words it keeps do not save enough payload to pay for their raw description. Replacing the MDL dictionary by chunks of a zstd-trained dictionary gives a larger codec on the synthetic and Linux corpora ( , +4.8% and +16.7%) but a 7.1% smaller one on real genomic data (63,198 against 68,063 B, , with both a smaller header and a smaller payload), so the MDL selection is not optimal there. The dictionaries selected here are much smaller than those obtained when the selection criterion charged the stored instead of the raw header (Section Q).
Trained statistics.: On synthetic genomic data, the context models are far worse than the codec (order 3: 70,715 B, ), as low-order Markov contexts cannot span variable-length tandem repeats. On the Linux logs, the codec is smaller than the order-2 model (32,115 against 42,269 B, ) and the order-3 model ( ). On synthetic JSON, it is smaller than the order-2 model (17,566 against 18,314 B, ) and the order-3 model (19,538 B, ) at , although the order-2 model overtakes it beyond 1,528 records (Section O). On real genomic data, all three context models are smaller than the codec: order 2 reaches 54,077 B ( ), order 1 55,129 B ( ) and order 3 60,604 B ( ), the last being penalized by its 18,829 B model. Because the codec's literal model does not condition on preceding symbols, records with few long dictionary matches are coded less efficiently than by Markovian literal models. These controls are idealized (ideal code length, not decoded), so the gap to a real decoder would be somewhat smaller.
Distance to the entropy floor.: On the synthetic corpora, the codec's payload (without the length field) is about 9.2 B per record on the genomic corpus (approx. 5.6 times the 1.64 B source entropy) and about 14.5 B per record on JSON (approx. 3.1 times the 4.76 B source entropy). The remaining gap reflects the cost of describing the source through a discrete dictionary and token-level bit coding.
O. Amortization of the Dictionary
The sizes above are totals over about records, over which the codec header and the baseline dictionaries are amortized. Table V and Figure 1 give the cost per record as a function of the number n of records, modelled as (dictionary)/n + where is the measured mean per-record cost (payload and length field). For n beyond the size of the test set this extrapolates the measured per-record cost with a frozen dictionary; the dictionary term of every method is charged as in Table III (raw size).
Against dictionary-based compressors.: The raw header of the codec is only 1.2 to 1.3 times larger than that of the best dictionary-based baseline (9,495 against 7,348 B on real genomic data, 5,934 against 5,109 B on Linux logs, 2,019 against 1,747 B on JSON, 904 against 683 B on synthetic genomic data), while its asymptotic per-record cost is lower by 11.2% (real genomic, 76.06 against 85.64 B), 16.3% (Linux), 24.5% (JSON) and 2.1% (synthetic genomic). The codec is smaller than the best baseline for n > 54 on synthetic JSON (against zlib-9 with a sampled dictionary), n > 162 on the Linux logs (against zlib-9 with S), n > 224 on real genomic data (against zstd-19 with a trained
TABLE V
AMORTIZED COST PER RECORD (B/RECORD: PAYLOAD AND INDEX, PLUS DICTIONARY OR HEADER DIVIDED BY ) AS A FUNCTION OF THE NUMBER OF RECORDS, FOR THE CODEC, THE BEST DICTIONARY-BASED BASELINE AND THE BEST IDEALIZED CONTROL OF EACH CORPUS (SELECTED AT , THE SIZE OF THE TEST SET: 979, 1 000, 1 000, 770 RECORDS FOR THE FOUR CORPORA IN ORDER). THE LAST COLUMN GIVES THE RANGE OF OVER WHICH THE CODEC IS THE SMALLER ONE. VALUES FOR EXTRAPOLATE THE MEASURED PER-RECORD COST WITH A FROZEN DICTIONARY. EVERY METHOD IS CHARGED FOR ITS DICTIONARY, HEADER OR MODEL AT ITS raw (UNCOMPRESSED) SIZE: FOR THE CODEC, THE WHOLE UNCOMPRESSED HEADER (ALPHABET, DICTIONARY AND PROBABILITY TABLES); FOR THE BASELINES, THE RAW DICTIONARY TEXT; FOR THE CONTEXT CONTROLS, THE RAW SERIALIZED MODEL.
| Corpus | Method | Dict. (B) | Codec smaller for | |||||
|---|---|---|---|---|---|---|---|---|
| Synth. genomic | Codec (MDL, exact pruning) | 904 | 100.5 | 19.2 | 11.1 | 10.2 | 10.16 | - |
| zlib-9 + MDL dict. | 683 | 78.6 | 17.2 | 11.1 | 10.4 | 10.38 | ||
| Order-3 context model (ideal) | 1274 | 198.3 | 83.7 | 72.2 | 71.0 | 70.92 | all | |
| Synth. JSON | Codec (MDL, exact pruning) | 2019 | 217.4 | 35.7 | 17.6 | 15.7 | 15.55 | - |
| zlib-9 + sampled dict. | 1747 | 195.3 | 38.1 | 22.3 | 20.8 | 20.59 | ||
| Order-2 context model (ideal) | 4186 | 432.7 | 56.0 | 18.3 | 14.5 | 14.13 | ||
| Linux logs | Codec (MDL, exact pruning) | 5934 | 619.6 | 85.5 | 32.1 | 26.8 | 26.18 | - |
| zlib-9 + MDL dict. | 5109 | 542.1 | 82.4 | 36.4 | 31.8 | 31.29 | ||
| Order-2 context model (ideal) | 8170 | 851.1 | 115.8 | 42.3 | 34.9 | 34.10 | all | |
| Real genomic | Codec (MDL, exact pruning) | 9495 | 1025.5 | 171.0 | 88.4 | 77.0 | 76.06 | - |
| zstd-19 + trained dict. | 7348 | 820.5 | 159.1 | 95.2 | 86.4 | 85.64 | ||
| Order-2 context model (ideal) | 9743 | 1031.9 | 155.0 | 70.2 | 58.5 | 57.58 |
dictionary) and on synthetic genomic data (against zlib-9 with ). At it is therefore ahead of the best baseline on JSON, Linux and real genomic data, and level with it on synthetic genomic data ( against a break-even of 989), which is the reading of Table III.
Against trained context models.: The comparison depends on the corpus. On synthetic genomic data, the codec is smaller than the order-3 model for every (asymptotically 10.16 against 70.92 B per record), and so it is on the Linux logs against the order-2 model (asymptotically 23.2% smaller, 26.18 against 34.10 B). On synthetic JSON, the codec is smaller than the order-2 model only for ; beyond, the order-2 model is smaller, asymptotically by 9.1% (14.13 against 15.55 B per record). On real genomic data, the order-2 model is smaller as soon as (asymptotically 57.58 against 76.06 B), because its state table (9,743 B) is of similar size to the codec's header (9,495 B) and its per-record cost is 24% lower.

(a) Synthetic genomic

(b) Synthetic JSON

(c) Linux logs

(d) Real genomic
Fig. 1. Amortized cost per record (bytes/record) as a function of the number of compressed records n, comparing the dual-source codec (thick curve) and its lazy variant against the best dictionary-based baseline, the best idealized control, Brotli-11 and, for the synthetic corpora, the Shannon floor (baseline and control selected at , vertical line).
P. Summary of Findings
-
Against the best general-purpose per-record compressor (Brotli-11), the codec is 34.5–83.4% smaller on every corpus (ratios 3.8–44.2%).
-
Against tuned dictionary baselines, the codec is smaller than the best zstd-19 variant on all four corpora ( to +45.1%) and than the best zlib-9 variant on JSON (+21.4%), Linux (+11.8%) and real genomic data (+7.9%); on synthetic genomic data it ties with zlib-9 ( to +0.3%). The ranking is the same when every method is charged at its stored instead of its raw size.
-
At equal dictionary content (zlib-9 with S), the codec is smaller on JSON (+23.2%), Linux logs (+11.8%) and real genomic data (+8.4%), with payloads 14–29% smaller; on synthetic genomic data its 2.4% payload gain is cancelled by its larger header (0.0%).
-
The dictionary accounts for most of the gain (size multiplied by 1.2–4.2 without it). Dynamic self-reference is decisive on the tandem-repeat corpus (size multiplied by 5.6 without it, and the dictionary alone is worse than no dictionary) and has no measurable effect on the other three corpora.
-
Exact pruning is better than or equal to lazy pruning on all four corpora, but the MDL dictionary is not optimal on real genomic data, where zstd-trained chunks give a 7.1% smaller codec.
-
The raw header of the codec is only 1.2–1.3 times that of the best baseline dictionary and is amortized beyond n = 54 to 989 records. Idealized trained order-2 context models are smaller than the codec on real genomic data for n > 13 and on synthetic JSON for n > 1,528, but not on the Linux logs or on synthetic genomic data. The codec is therefore not best-in-class.
Q. Threats to Validity and Limitations
• Model vs. codec gap. The empirical codec optimizes encoded bit length by dynamic programming rather than pure phrase count . Its performance reflects downstream entropy-modeling choices, including a context-free literal model and bounded candidate factors (matches of at most 256 characters).
• Dictionary accounting sensitivity. All methods are charged at the raw size of their dictionary, header or model. Charging stored (zlib-compressed) sizes instead changes the margins against the dictionary-based baselines by at most one point and leaves the ranking unchanged (Section M); it lowers the margin over the order-2 model on JSON, since the tables of both models compress well (1.8 to 3.1 times for the codec header). Baseline budgets were selected on the validation set under the raw rule only.
• Statistical uncertainty. Every figure is a mean over only 3 draws, no confidence intervals are reported, and differences of a few percent (the tie with zlib-9 on synthetic genomic data, to +0.3%; between the pruning modes and +0.6% for RLZ on the Linux logs) should not be over-interpreted.
• Synthetic corpora. The synthetic generators are the authors'; the structure they contain (tandem repeats, near-identical templates) favors dictionary methods, and the entropy floors apply only to them.
• Selection criterion and dictionary size. The MDL checkpoint selection charges the raw header, like the evaluation. In an earlier run in which the criterion used the stored (compressed) header, which under-charges each dictionary word, the selected dictionaries were much larger (raw header of 4,642, 11,013 and 15,078 B instead of 904, 2,019 and 5,934 B on synthetic genomic, JSON and Linux; unchanged at 9,495 B on real genomic data) and the codec was larger than zlib-9 with dictionaries on the synthetic corpora. The selection criterion must therefore match the accounting rule. On real genomic data, zstd-trained chunks still give a smaller codec, the selection is made on the training records only, and the effect of the deployment parameter and of a size budget was not studied.
• Controls and bounds. Context models represent entropy bounds rather than full decodable codecs. Stronger statistical compressors (PPM or context mixing with trained priors) and Brotli with custom dictionaries were not benchmarked.
• Corpora scale. Experiments focus on short-record batches ( records, training sets of 150–200 records). Scaling training sets or record lengths may alter the balance between static dictionary matching and statistical context models.
• Offline cost. MDL dictionary selection evaluates candidate parses across K = 25 checkpoints, representing an offline pre-computation cost not charged to online stream encoding.
TABLE VI: Core structural properties.
| Property | Non-adaptive | Adaptive |
|---|---|---|
| Bounds | ✓(Prop. III.6) | ✓(Prop. III.6) |
| Monotonicity in | ✓(Prop. III.7) | ✓(Prop. III.7) |
| Monotonicity by contiguous factor | ✓(Lem. III.8) | fails (Remark after Lem. III.8) |
| Concatenation | ✓, within (Prop. III.10) | ✓, within with contextual cost (Prop. III.14) |
| Repetition | within , linear in (Cor. III.11) | , tight (Prop. III.16) |
| Relation between the two measures | — | , tight (Thm. III.17) |
| Universal floor | (Cor. III.19) | |
| Counting bound | — | strings with blocks (Thm. A.1) |
| Separation criterion | — | all gains (Prop. A.7) |
| Normalized phrase count | — | independent of fixed finite for stationary ergodic sources over with (Thm. A.12) |
| Greedy optimality | ✓(Sec. IV-C) | ✓(Thm. IV.2) |
| Empty dictionary | — | non-overlapping LZ77 phrase count (Prop. IV.5) |
| Domination | (Prop. IV.6) | |
| Overlapping LZ77 | — | (Prop. IV.8) |
| Single reference | — | within factor 2 of preset-history LZ77 (Thm. IV.10) |
| Computation | greedy RLZ | with suffix automata (Thm. IV.12) |
Tables VII–X give the complete Scenario A results of Section K for each corpus, grouped by family. The last group of each table contains the optimistic bounds mentioned in Section L. They estimate the dictionary-primed cost of Brotli, LZMA and PPMd by the marginal cost plus the size of an empty stream, where is the dictionary and a record. They are not measurements: the entropy tables of the compressor are already adapted to when is appended, whereas an independently decoded record must carry or relearn them. We validated the estimator on zlib-9 and zstd-19, whose dictionary interfaces give the true cost (one draw, 2 KiB sampled dictionary): it under-estimated the payload by 10% and 33% on the genomic generator and by 36% and 46% on the JSON generator, respectively. Rows of this group must therefore not be compared with the others.
TABLE VII: Scenario A, full results on the Synth. genomic corpus (mean record length ≈ 288 B). Payload: sum of compressed record sizes; Index: one variable-length integer per record; Dict. (raw) / (stored): dictionary, codec header or model, uncompressed / as stored (zlib); Total = payload + index + Dict. (raw); – codec/method (positive: codec smaller), mean of the per-draw gains. Every method is charged for its dictionary, header or model at its raw (uncompressed) size: for the codec, the whole uncompressed header (alphabet, dictionary and probability tables); for the baselines, the raw dictionary text; for the context controls, the raw serialized model.
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | (%) |
|---|---|---|---|---|---|---|
| Codec | ||||||
| Codec (MDL, exact pruning) | 8964 | 979 | 904 | 288 | 10847 | ref. |
| Codec, lazy pruning () | 8697 | 979 | 1628 | 354 | 11304 | +4.0 |
| Codec ablations | ||||||
| Codec, = chunks of zstd-trained dict. | 9727 | 979 | 916 | 441 | 11623 | +6.7 |
| Codec w/o dictionary () | 22155 | 979 | 129 | 132 | 23263 | +53.4 |
| Codec w/o self-reference (RLZ) | 58391 | 1068 | 896 | 302 | 60355 | +82.0 |
| Dictionary-based baselines | ||||||
| zlib-9 + MDL dict. | 9183 | 979 | 683 | 87 | 10844 | 0.0 |
| zlib-9 + trained dict. | 9230 | 979 | 668 | 196 | 10877 | +0.3 |
| zlib-9 + sampled dict. | 10244 | 979 | 677 | 55 | 11901 | +8.8 |
| zstd-19 + trained dict. | 17945 | 979 | 830 | 203 | 19754 | +45.1 |
| zstd-19 + MDL dict. | 18583 | 979 | 683 | 87 | 20244 | +46.4 |
| zstd-19 + sampled dict. | 19402 | 979 | 357 | 47 | 20738 | +47.7 |
| General-purpose baselines (no dictionary) | ||||||
| Brotli-11 | 31149 | 979 | 0 | 0 | 32128 | +66.2 |
| zstd-19 | 35472 | 979 | 0 | 0 | 36451 | +70.2 |
| zlib-9 (raw deflate) | 40813 | 979 | 0 | 0 | 41792 | +74.0 |
| zlib-6 (framed) | 46687 | 979 | 0 | 0 | 47666 | +77.2 |
| LZMA (raw) | 47730 | 979 | 0 | 0 | 48709 | +77.7 |
| bzip2 | 66514 | 979 | 0 | 0 | 67493 | +83.9 |
| Idealized context-model controls | ||||||
| Order-3 context model (ideal) | 68349 | 1092 | 1274 | 913 | 70715 | +84.7 |
| Order-1 context model (ideal) | 70239 | 1062 | 81 | 81 | 71383 | +84.8 |
| Order-2 context model (ideal) | 70208 | 1070 | 349 | 308 | 71627 | +84.8 |
| Optimistic bounds (not measurements; see text) | ||||||
| Brotli-11, primed (sampled dict.) | 6030 | 979 | 958 | 61 | 7966 | -37.5 |
TABLE VII – suite de la page précédente
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | Δ (%) |
|---|---|---|---|---|---|---|
| Brotli-11, primed (MDL dict. ) | 8036 | 979 | 683 | 87 | 9698 | |
| PPMd (order 8), primed (sampled dict.) | 10124 | 979 | 1338 | 70 | 12442 | |
| PPMd (order 8), primed (MDL dict. ) | 11126 | 979 | 683 | 87 | 12787 | |
| LZMA, primed (MDL dict. ) | 16474 | 979 | 683 | 87 | 18136 | |
| LZMA, primed (sampled dict.) | 17937 | 979 | 357 | 47 | 19273 |
TABLE VIII: Scenario A, full results on the Synth. JSON corpus (mean record length ≈ 114 B). Payload: sum of compressed record sizes; Index: one variable-length integer per record; Dict. (raw) / (stored): dictionary, codec header or model, uncompressed / as stored (zlib); Total = payload + index + Dict. (raw); Δ = 1 – codec/method (positive: codec smaller), mean of the per-draw gains. Every method is charged for its dictionary, header or model at its raw (uncompressed) size: for the codec, the whole uncompressed header (alphabet, dictionary and probability tables); for the baselines, the raw dictionary text; for the context controls, the raw serialized model.
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | Δ (%) |
|---|---|---|---|---|---|---|
| Codec | ||||||
| Codec (MDL, exact pruning) | 14547 | 1000 | 2019 | 856 | 17566 | ref. |
| Codec, lazy pruning () | 14706 | 1000 | 2838 | 1120 | 18544 | |
| Codec ablations | ||||||
| Codec w/o self-reference (RLZ) | 14551 | 1000 | 2014 | 849 | 17565 | 0.0 |
| Codec, = chunks of zstd-trained dict. | 15366 | 1000 | 2091 | 867 | 18456 | |
| Codec w/o dictionary () | 72852 | 1000 | 270 | 213 | 74122 | |
| Dictionary-based baselines | ||||||
| zlib-9 + sampled dict. | 19589 | 1000 | 1747 | 356 | 22336 | |
| zlib-9 + trained dict. | 19651 | 1000 | 1870 | 494 | 22521 | |
| zlib-9 + MDL dict. | 20439 | 1000 | 1443 | 430 | 22882 | |
| zstd-19 + sampled dict. | 29083 | 1000 | 1747 | 356 | 31830 | |
| zstd-19 + trained dict. | 28950 | 1000 | 1882 | 498 | 31831 | |
| zstd-19 + MDL dict. | 30560 | 1000 | 1443 | 430 | 33003 | |
| General-purpose baselines (no dictionary) | ||||||
| Brotli-11 | 104746 | 1000 | 0 | 0 | 105746 | |
| zlib-9 (raw deflate) | 107863 | 1000 | 0 | 0 | 108863 | |
| LZMA (raw) | 109163 | 1000 | 0 | 0 | 110163 | |
| zstd-19 | 110007 | 1000 | 0 | 0 | 111007 | |
| zlib-6 (framed) | 113863 | 1000 | 0 | 0 | 114863 | |
| bzip2 | 135482 | 2000 | 0 | 0 | 137482 | |
TABLE VIII – suite de la page précédente
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | Δ (%) |
|---|---|---|---|---|---|---|
| Idealized context-model controls | ||||||
| Order-2 context model (ideal) | 13 128 | 1 000 | 4 186 | 2 542 | 18 314 | +4.1 |
| Order-3 context model (ideal) | 9 943 | 1 000 | 8 595 | 4 701 | 19 538 | +10.1 |
| Order-1 context model (ideal) | 28 511 | 1 000 | 878 | 744 | 30 389 | +42.2 |
| Optimistic bounds (not measurements; see text) | ||||||
| Brotli-11, primed (sampled dict.) | 3 482 | 1 000 | 3 841 | 567 | 8 323 | +277.3 |
| PPMd (order 8), primed (sampled dict.) | 13 780 | 1 000 | 1 974 | 380 | 16 754 | -4.9 |
| PPMd (order 8), primed (MDL dict. ) | 15 706 | 1 000 | 1 443 | 430 | 18 149 | +3.1 |
| Brotli-11, primed (MDL dict. ) | 15 784 | 1 000 | 1 443 | 430 | 18 227 | +2.7 |
| LZMA, primed (sampled dict.) | 20 979 | 1 000 | 1 974 | 380 | 23 953 | +26.6 |
| LZMA, primed (MDL dict. ) | 26 110 | 1 000 | 1 443 | 430 | 28 553 | +38.5 |
TABLE IX: Scenario A, full results on the Linux logs corpus (mean record length ≈ 191 B). Payload: sum of compressed record sizes; Index: one variable-length integer per record; Dict. (raw) / (stored): dictionary, codec header or model, uncompressed / as stored (zlib); Total = payload + index + Dict. (raw); Δ = 1 – codec/method (positive: codec smaller), mean of the per-draw gains. Every method is charged for its dictionary, header or model at its raw (uncompressed) size: for the codec, the whole uncompressed header (alphabet, dictionary and probability tables); for the baselines, the raw dictionary text; for the context controls, the raw serialized model.
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | Δ (%) |
|---|---|---|---|---|---|---|
| Codec | ||||||
| Codec (MDL, exact pruning) | 25 181 | 1 000 | 5 934 | 2 244 | 32 115 | ref. |
| Codec, lazy pruning () | 24 497 | 1 000 | 6 758 | 2 524 | 32 255 | +0.4 |
| Codec ablations | ||||||
| Codec w/o self-reference (RLZ) | 25 404 | 1 000 | 5 901 | 2 210 | 32 305 | +0.6 |
| Codec, = chunks of zstd-trained dict. | 31 056 | 1 000 | 6 484 | 2 463 | 38 539 | +16.7 |
| Codec w/o dictionary () | 110 520 | 1 282 | 423 | 357 | 112 225 | +71.4 |
| Dictionary-based baselines | ||||||
| zlib-9 + MDL dict. | 30 285 | 1 000 | 5 109 | 1 623 | 36 393 | +11.8 |
| zlib-9 + trained dict. | 29 501 | 1 000 | 6 669 | 1 811 | 37 170 | +13.6 |
| zlib-9 + sampled dict. | 32 010 | 1 000 | 7 475 | 1 446 | 40 485 | +20.5 |
| zstd-19 + trained dict. | 37 259 | 1 000 | 7 142 | 1 878 | 45 402 | +29.3 |
| zstd-19 + MDL dict. | 41 663 | 1 000 | 5 109 | 1 623 | 47 772 | +32.8 |
| zstd-19 + sampled dict. | 42 416 | 1 000 | 7 664 | 1 472 | 51 081 | +37.0 |
General-purpose baselines (no dictionary)
TABLE IX – suite de la page précédente
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | Δ (%) |
|---|---|---|---|---|---|---|
| Brotli-11 | 144 367 | 1 610 | 0 | 0 | 145 976 | +78.0 |
| zlib-9 (raw deflate) | 146 860 | 1 793 | 0 | 0 | 148 653 | +78.4 |
| zstd-19 | 152 244 | 1 938 | 0 | 0 | 154 182 | +79.2 |
| zlib-6 (framed) | 152 860 | 1 925 | 0 | 0 | 154 785 | +79.2 |
| LZMA (raw) | 153 302 | 1 885 | 0 | 0 | 155 187 | +79.3 |
| bzip2 | 181 323 | 2 000 | 0 | 0 | 183 323 | +82.5 |
| Idealized context-model controls | ||||||
| Order-2 context model (ideal) | 33 099 | 1 000 | 8 170 | 5 755 | 42 269 | +24.0 |
| Order-3 context model (ideal) | 22 965 | 1 000 | 18 863 | 12 119 | 42 829 | +25.0 |
| Order-1 context model (ideal) | 64 131 | 1 000 | 1 921 | 1 620 | 67 052 | +52.1 |
| Optimistic bounds (not measurements; see text) | ||||||
| Brotli-11, primed (sampled dict.) | 21 662 | 1 000 | 5 312 | 1 146 | 27 974 | -15.4 |
| PPMd (order 8), primed (MDL dict. ) | 23 339 | 1 000 | 5 109 | 1 623 | 29 448 | -9.1 |
| Brotli-11, primed (MDL dict. ) | 24 050 | 1 000 | 5 109 | 1 623 | 30 158 | -6.6 |
| PPMd (order 8), primed (sampled dict.) | 25 234 | 1 000 | 5 990 | 1 247 | 32 224 | +0.2 |
| LZMA, primed (MDL dict. ) | 32 404 | 1 000 | 5 109 | 1 623 | 38 513 | +16.6 |
| LZMA, primed (sampled dict.) | 31 202 | 1 000 | 6 329 | 1 289 | 38 532 | +16.5 |
TABLE X: Scenario A, full results on the Real genomic corpus (mean record length ≈ 200 B). Payload: sum of compressed record sizes; Index: one variable-length integer per record; Dict. (raw) / (stored): dictionary, codec header or model, uncompressed / as stored (zlib); Total = payload + index + Dict. (raw); Δ = 1 – codec/method (positive: codec smaller), mean of the per-draw gains. Every method is charged for its dictionary, header or model at its raw (uncompressed) size: for the codec, the whole uncompressed header (alphabet, dictionary and probability tables); for the baselines, the raw dictionary text; for the context controls, the raw serialized model.
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | Δ (%) |
|---|---|---|---|---|---|---|
| Codec | ||||||
| Codec (MDL, exact pruning) | 57 797 | 771 | 9 495 | 5 148 | 68 063 | ref. |
| Codec, lazy pruning () | 58 069 | 771 | 15 816 | 8 134 | 74 656 | +8.8 |
| Codec ablations | ||||||
| Codec, = chunks of zstd-trained dict. | 54 959 | 771 | 7 468 | 3 693 | 63 198 | -7.7 |
| Codec w/o self-reference (RLZ) | 56 051 | 772 | 9 334 | 5 036 | 66 157 | -2.9 |
| Codec w/o dictionary () | 81 321 | 776 | 544 | 424 | 82 641 | +17.6 |
| Dictionary-based baselines | ||||||
| zstd-19 + trained dict. | 65 175 | 771 | 7 348 | 3 222 | 73 295 | +7.1 |
TABLE X – suite de la page précédente
| Method | Payload | Index | Dict. (raw) | Dict. (stored) | Total (B) | Δ (%) |
|---|---|---|---|---|---|---|
| zlib-9 + trained dict. | 66 002 | 772 | 7 101 | 3 123 | 73 874 | +7.9 |
| zlib-9 + MDL dict. S | 67 256 | 772 | 6 306 | 2 742 | 74 333 | +8.4 |
| zlib-9 + sampled dict. | 66 543 | 772 | 7 520 | 2 922 | 74 835 | +9.0 |
| zstd-19 + sampled dict. | 78 120 | 778 | 7 240 | 2 824 | 86 139 | +21.0 |
| zstd-19 + MDL dict. S | 79 817 | 780 | 6 306 | 2 742 | 86 903 | +21.7 |
| General-purpose baselines (no dictionary) | ||||||
| Brotli-11 | 102 545 | 1 313 | 0 | 0 | 103 859 | +34.5 |
| zlib-9 (raw deflate) | 108 673 | 1 526 | 0 | 0 | 110 199 | +38.2 |
| zstd-19 | 109 109 | 1 484 | 0 | 0 | 110 594 | +38.5 |
| zlib-6 (framed) | 113 294 | 1 538 | 0 | 0 | 114 832 | +40.7 |
| LZMA (raw) | 114 037 | 1 534 | 0 | 0 | 115 571 | +41.1 |
| bzip2 | 132 221 | 1 539 | 0 | 0 | 133 760 | +49.1 |
| Idealized context-model controls | ||||||
| Order-2 context model (ideal) | 43 562 | 771 | 9 743 | 6 665 | 54 077 | -25.9 |
| Order-1 context model (ideal) | 51 807 | 771 | 2 550 | 1 997 | 55 129 | -23.5 |
| Order-3 context model (ideal) | 41 004 | 771 | 18 829 | 12 222 | 60 604 | -12.3 |
| Optimistic bounds (not measurements; see text) | ||||||
| Brotli-11, primed (sampled dict.) | 29 784 | 770 | 7 400 | 2 867 | 37 954 | -152.7 |
| PPMd (order 8), primed (MDL dict. S) | 47 533 | 770 | 6 306 | 2 742 | 54 609 | -24.6 |
| PPMd (order 8), primed (sampled dict.) | 48 779 | 770 | 5 360 | 2 150 | 54 909 | -24.0 |
| Brotli-11, primed (MDL dict. S) | 50 964 | 771 | 6 306 | 2 742 | 58 041 | -18.2 |
| LZMA, primed (sampled dict.) | 57 331 | 770 | 6 520 | 2 571 | 64 621 | -5.3 |
| LZMA, primed (MDL dict. S) | 58 807 | 770 | 6 306 | 2 742 | 65 883 | -3.4 |
REFERENCES
[1] P.-F. Marteau, “Sequence Covering for Efficient Host-Based Intrusion Detection,” IEEE Transactions on Information Forensics and Security, vol. 14, no. 4, pp. 994–1006, Apr. 2019.
[2] S. Kuruppu, S. J. Puglisi, and J. Zobel, “Relative lempel-ziv compression of genomes for large-scale storage and retrieval,” in Proceedings of the 17th International Conference on String Processing and Information Retrieval, ser. SPIRE’10. Berlin, Heidelberg: Springer-Verlag, 2010, pp. 201–206.
[3] C. Hoobin, S. J. Puglisi, and J. Zobel, “Relative lempel-ziv factorization for efficient storage and retrieval of web collections,” Proc. VLDB Endow., vol. 5, no. 3, pp. 265–273, Nov. 2011. [Online]. Available: https://doi.org/10.14778/2078331.2078341
[4] J. Ziv and N. Merhav, “A measure of relative entropy between individual sequences with application to universal classification,” IEEE Transactions on Information Theory, vol. 39, no. 4, pp. 1270–1279, 1993.
[5] P. Deutsch and J.-L. Gailly, “ZLIB compressed data format specification version 3.3,” RFC 1950, IETF, 1996.
[6] Y. Collet, “Zstandard: A real-time compression algorithm,” https://facebook.github.io/zstd/, 2016.
[7] J. Alakuijala, A. Farruggia, P. Ferragina, E. Kliuchnikov, R. Obryk, Z. Szabadka, and L. Vandevenne, “Brotli: A general-purpose data compressor,” ACM Trans. Inf. Syst., vol. 37, no. 1, Dec. 2018. [Online]. Available: https://doi.org/10.1145/3231935
[8] K. Liao, M. Petri, A. Moffat, and A. Wirth, “Effective construction of relative lempel-ziv dictionaries,” in Proceedings of the 25th International Conference on World Wide Web, ser. WWW '16. Republic and Canton of Geneva, CHE: International World Wide Web Conferences Steering Committee, 2016, pp. 807–816. [Online]. Available: https://doi.org/10.1145/2872427.2883042
[9] J. Ziv and A. Lempel, “A universal algorithm for sequential data compression,” IEEE Transactions on Information Theory, vol. 23, no. 3, pp. 337–343, 1977.
[10] —, “Compression of individual sequences via variable-rate coding,” IEEE Trans. Inf. Theory, vol. 24, pp. 530–536, 1978. [Online]. Available: https://api.semanticscholar.org/CorpusID:20900807
[11] J. A. Storer and T. G. Szymanski, “Data compression via textual substitution,” J. ACM, vol. 29, no. 4, pp. 928–951, Oct. 1982. [Online]. Available: https://doi.org/10.1145/322344.322346
[12] M. Crochemore, A. Langiu, and F. Mignosi, “Note on the greedy parsing optimality for dictionary-based text compression,” Theoretical Computer Science, vol. 525, pp. 55–59, 2014, advances in Stringology. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0304397514000309
[13] M. Cohn and R. Khazan, “Parsing with prefix and suffix dictionaries,” in Proceedings of the Data Compression Conference. IEEE, 1996, pp. 180–189.
[14] A. Langiu, “On parsing optimality for dictionary-based text compression—the zip case,” Journal of Discrete Algorithms, vol. 20, pp. 65–70, 2013, stringMasters 2011 Special Issue. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S1570866713000257
[15] D. Kosolobov and A. M. Shur, “Comparison of LZ77-type parsings,” Information Processing Letters, vol. 141, pp. 25–29, 2019.
[16] D. S. Ornstein and B. Weiss, “Entropy and data compression schemes,” IEEE Trans. Inf. Theory, vol. 39, pp. 78–83, 1993. [Online]. Available: https://api.semanticscholar.org/CorpusID:43521146
[17] A. Blumer, J. Blumer, D. Haussler, A. Ehrenfeucht, M.-T. Chen, and J. I. Seiferas, “The smallest automaton recognizing the subwords of a text,” Theor. Comput. Sci., vol. 40, pp. 31–55, 1985. [Online]. Available: https://api.semanticscholar.org/CorpusID:13277581
[18] M. Mohri, P. J. M. Mengibar, and E. Weinstein, “General suffix automaton construction algorithm and space bounds,” Theor. Comput. Sci., vol. 410, pp. 3553–3562, 2009. [Online]. Available: https://api.semanticscholar.org/CorpusID:8808472
[19] W. Rytter, “Application of lempel–ziv factorization to the approximation of grammar-based compression,” Theoretical Computer Science, vol. 302, no. 1, pp. 211–222, 2003. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0304397502007776
[20] M. Charikar, E. Lehman, D. Liu, R. Panigrahy, M. Prabhakaran, A. Sahai, and A. Shelat, “The smallest grammar problem,” IEEE Transactions on Information Theory, vol. 51, no. 7, pp. 2554–2576, 2005.
[21] M. Middendorf, “More on the complexity of common superstring and supersequence problems,” Theoretical Computer Science, vol. 125, no. 2, pp. 205–228, 1994. [Online]. Available: https://www.sciencedirect.com/science/article/pii/0304397592000742
[22] P. D. Grünwald, The Minimum Description Length Principle. MIT Press, 2007.
[23] J. Rissanen, “Modeling by shortest data description,” Automatica, vol. 14, no. 5, pp. 465–471, 1978. [Online]. Available: https://www.sciencedirect.com/science/article/pii/0005109878900055
[24] A. D. Wyner and J. Ziv, “Some asymptotic properties of the entropy of a stationary ergodic data source with applications to data compression,” IEEE Transactions on Information Theory, vol. 35, no. 6, pp. 1250–1258, 1989.
[25] M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness. San Francisco, CA: W. H. Freeman, 1979.
[26] J. Gallant, D. Maier, and J. A. Storer, “On finding minimal length superstrings,” Journal of Computer and System Sciences, vol. 20, no. 1, pp. 50–58, 1980.