[−][src]Crate deadyet
This package allows you to efficiently search for hex patterns in the
hex representation of Decodable
values.
It is intended to find and search for these patterns in unix timestamps, specifically
occurences of DEAD
within the timestamp but is not limited to this.
use deadyet::{to_next_dead, to_next_pattern, has_pattern, Decodable}; assert_eq!(to_next_dead(0xDEAE), 0xFFFF); assert_eq!(to_next_dead(0xDEACFF), 1); assert_eq!(to_next_dead(0xDEAD0), 0); assert_eq!(to_next_dead(0xDEAC0), 0x10); assert_eq!(to_next_pattern(0xAAAAA, 0xABBA, 0xFFFF), 0x110); assert!(has_pattern(0xAABBAA, 0xABBA));
Roadmap
- Implement iterator for pattern searches
- Reverse search
Traits
Decodable |
Functions
has_dead | Checks if |
has_pattern | Checks whether or not the pattern of |
is_it_dead | Returns whether the current unix timecode contains a |
next_dead | Returns the tuple (diff, abs) for the time until the next
|
secs_until_dead | Returns the number of seconds until the next |
to_next_dead | |
to_next_dead_at_end | Returns time time to the next dead ignoring the |
to_next_pattern | |
to_next_pattern_at_end |