-
-
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.
* bit_vec * quickinstall * no dry-run * revert back quickinstall * try runner * arm64 * no ARM yet * nothing to see here * install and uninstall
- Loading branch information
1 parent
af51711
commit fe9fa10
Showing
6 changed files
with
47 additions
and
29 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,2 +1,17 @@ | ||
# Data Block Set | ||
|
||
Data Block Set | ||
|
||
## For Developers | ||
|
||
Installation: | ||
|
||
``` | ||
cargo install --git https://github.com/datablockset/blockset | ||
``` | ||
|
||
Uninstallation: | ||
|
||
``` | ||
cargo uninstall blockset | ||
``` |
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,25 +1,28 @@ | ||
#[derive(Default)] | ||
pub struct BitVec32 { | ||
pub v: u64, | ||
pub struct BitVec { | ||
pub value: u64, | ||
pub len: u8, | ||
} | ||
|
||
impl BitVec32 { | ||
impl BitVec { | ||
pub const fn new(v: u32, len: u8) -> Self { | ||
Self { v: v as u64, len } | ||
Self { | ||
value: v as u64, | ||
len, | ||
} | ||
} | ||
pub fn push(&mut self, f: &mut impl FnMut(u32), size: u8, b: BitVec32) { | ||
pub fn push(&mut self, f: &mut impl FnMut(u32), size: u8, b: BitVec) { | ||
assert!(size <= 32); | ||
self.v |= b.v << self.len; | ||
self.value |= b.value << self.len; | ||
self.len += b.len; | ||
let mask = (1 << size) - 1; | ||
loop { | ||
if self.len < size { | ||
return; | ||
} | ||
f((self.v & mask) as u32); | ||
f((self.value & mask) as u32); | ||
self.len -= size; | ||
self.v >>= size; | ||
self.value >>= size; | ||
} | ||
} | ||
} |
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,7 +1,7 @@ | ||
mod app; | ||
mod ascii; | ||
mod base32; | ||
mod bit_vec32; | ||
mod bit_vec; | ||
mod digest224; | ||
mod io; | ||
mod sha224; | ||
|