-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
89 additions
and
124 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
pub const block = struct { | ||
pub const tokens = 1 << 14; | ||
}; | ||
|
||
pub const match = struct { | ||
pub const base_length = 3; // smallest match length per the RFC section 3.2.5 | ||
pub const min_length = 4; // min length used in this algorithm | ||
pub const max_length = 258; | ||
|
||
pub const min_distance = 1; | ||
pub const max_distance = 32768; | ||
}; | ||
|
||
pub const window = struct { // TODO: consider renaming this into history | ||
pub const bits = 15; | ||
pub const size = 1 << bits; | ||
pub const mask = size - 1; | ||
}; | ||
|
||
pub const hash = struct { | ||
pub const bits = 17; | ||
pub const size = 1 << bits; | ||
pub const mask = size - 1; | ||
pub const shift = 32 - bits; | ||
}; |
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
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
Oops, something went wrong.