forked from rust-lang/regex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use variable width integer encoding for compression.
This slightly modifies the implementation in rust-lang#226 to use variable width integers. This saves a touch more space with regexes with huge alternations spanning larger-than-127 instructions (typically from Unicode character classes). This also adjusts `approximate_size`, which is the actual gatekeeper behind deciding whether the DFA has filled its cache or not. The approximation is now reduced slightly to account for the space savings. The variable integer encoding used is from Protocol Buffers, documented here: https://developers.google.com/protocol-buffers/docs/encoding#varints
- Loading branch information
1 parent
14a8989
commit c5d9304
Showing
1 changed file
with
91 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters