Skip to content

Commit

Permalink
bump version to v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhminhmr committed May 25, 2023
1 parent 951d64d commit 72b8810
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "srx"
version = "0.2.1"
version = "0.3.0"
edition = "2021"

[profile.dev]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Fast Symbol Ranking based compressor. Based on the idea of [Matt Mahoney's SR2](
## Usage

```
srx: The fast Symbol Ranking based compressor, version 0.2.1.
srx: The fast Symbol Ranking based compressor, version 0.3.0.
Copyright (C) 2023 Mai Thanh Minh (a.k.a. thanhminhmr)
To compress: srx c <input-file> <output-file>
Expand Down
2 changes: 1 addition & 1 deletion src/primary_context/history/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ fn test_and_generate_state_table() -> AnyResult<()> {
third: 0,
});

table.export()?;
// table.export()?;

let mut states: Vec<&PrimitiveState> = table.map.values().collect();
states.sort_by_key(|x| x.current_state);
Expand Down
9 changes: 5 additions & 4 deletions src/secondary_context/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
*/

#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
#[repr(usize)]
pub enum Bit {
Zero,
One,
Zero = 0,
One = 1,
}

impl From<Bit> for bool {
Expand Down Expand Up @@ -53,10 +54,10 @@ macro_rules! impl_from_for_bit {
}
impl From<$t> for Bit {
fn from(value: $t) -> Self {
debug_assert!(value == 0 || value == 1, "Unexpected value for Bit!");
match value {
0 => Bit::Zero,
1 => Bit::One,
_ => panic!("Unexpected value for Bit!"),
_ => Bit::One,
}
}
}
Expand Down

0 comments on commit 72b8810

Please sign in to comment.