-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start adding new clippy lints * Improve compressor bitwriter slightly * Make num_bits a u32 * Add test for compressing long inputs * Make `num_bits` a `u8` * Remove unreachable `expect`s * Add cache to Bindings action * Add long input decompress test * Fix long input decompress bug * Fix clippy * Limit n in `read_bits` * Make `code` a `u32` * Remove `dict_size` * Use stream code constants * Remove uneeded insert * Make `enlarge_in` a `u64` * Decrease position var size
- Loading branch information
1 parent
50b0435
commit 69bf361
Showing
4 changed files
with
74 additions
and
58 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
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 |
---|---|---|
@@ -1,5 +1,19 @@ | ||
pub const URI_KEY: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$"; | ||
pub const BASE64_KEY: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; | ||
|
||
/// The stream code for a `u8`. | ||
pub const U8_CODE: u8 = 0; | ||
|
||
/// The stream code for a `u16`. | ||
pub const U16_CODE: u8 = 1; | ||
|
||
/// End of stream signal | ||
pub const CLOSE_CODE: u16 = 2; | ||
pub const CLOSE_CODE: u8 = 2; | ||
|
||
/// The starting size of a code. | ||
/// | ||
/// Compression starts with the following codes: | ||
/// 0: u8 | ||
/// 1: u16 | ||
/// 2: close stream | ||
pub const START_CODE_BITS: u8 = 2; |
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